6

Inspired by Is $29$ the only prime of the form $p^p+2$?.


Claims on prime powers and their alternating sums

Consider the expressions $\mathcal P=\sum\limits_{i=1}^n p_i^{p_i}$ and $\mathcal Q=\sum\limits_{i=1}^n (-1)^ip_i^{p_i}$ over the prime numbers $(p_i)_{i\in\Bbb N}$.

Then I claim that

  • $n=2,4,24$ are the only occasions when $\mathcal P$ is prime.

  • $n=2,4$ are the only occasions when $\mathcal Q$ is prime.

PARI/GP code is for(n=1,+oo,if(isprime(sum(i=1,2*n,prime(i)^prime(i)))==1,print(n))). Note that we need only check even $n$ as all prime powers are odd excluding $p_1=2$.


Frankly I have no clue where to start. However, $\mathcal P$ and $\mathcal Q$ can be represented as $$\pm2^2+3^3+x\,\text{terms of the form}\,(6k-1)^{6k-1}+(n-x-2)\,\text{terms of the form}\,(6k+1)^{6k+1}.$$ Now working in modulo $6$, $$\mathcal P\equiv 4+0+x\cdot(-1)^{-1}+(n-x-2)\cdot1^1\equiv2-2x+n\pmod6$$ so $\mathcal P$ is always composite when $n\equiv2(x-1)\pmod6$. Similarly, $$\mathcal Q\equiv -4+0+x\cdot(-1)^{-1}+(n-x-2)\cdot1^1\equiv n-2x\pmod6$$ so $\mathcal Q$ is always composite when $n\equiv2x\pmod6$. Despite this, it is difficult to verify these congruences since $x$ can be hard to determine when $n$ is large.

Nonetheless, I suspect a modular approach like the one above is too simple to solve the problem. I would appreciate any advances on this, though I would like further values of $n$ through computation to be made in the comments and not in the answers.

TheSimpliFire
  • 28,020
  • I did not know that pari/gp allows infinite loops :) – Peter Jun 25 '19 at 11:30
  • If I remember right, a long time ago I checked the first expression. – Peter Jun 25 '19 at 11:32
  • An improved code (considering speed) for the first expression is the routine : s=0;p=1;for(n=1,10^4,p=nextprime(p+1);s=s+p^p;if(ispseudoprime(s)==1,print(n," ",p))) – Peter Jun 25 '19 at 11:34
  • I am not aware of any principle, except some heuristic ones, that would forbid some primes for some large values of $n$. – Grešnik Jun 26 '19 at 10:53
  • A further prime of either form must have more than $40\ 000$ digits – Peter Jun 26 '19 at 11:53

0 Answers0