# Does there exist prime number of the form $0^0+1^1+2^2+3^3+4^4+…$ after the trivial one $2$?

I am interested with prime numbers of the form $0^0+1^1+2^2+3^3+4^4+....(n-1)^{n-1}+ n^n$ (where we take $0^0=1$). I've checked $n$ up to $250$, and I found that numbers of such form are very very often divisible by small primes. And I'm starting to have a doubt that numbers of such form will ever be a prime after the trivial $0^0+1^1=2$. Does there exist prime number of such form after the trivial one $2$ ?

• Maple says that $0^0+1^1+\cdots+52^{52}$ is prime. – user940 Jun 14 '16 at 17:33
• I've removed a great deal of comments from this question. If someone would like to discuss the reasons for or against certain mathematical conventions, I recommend using Mathematics Chat. – davidlowryduda Jun 14 '16 at 17:52
• Your question doesn't ask for $n$ to be prime, it asks for the sum of the specified $n+1$ terms to be prime. Did you really ask what you meant to ask? – MPW Jun 14 '16 at 17:55
• I've made a major error in my calculations, sorry guys.... – mahjong grandmaster Jun 14 '16 at 18:12

## 2 Answers

Checking up to $n = 500$, I find that the expression is prime for $n = 1, 52, 124, 431$.

There is no reason to believe that there are only finitely many.

Edit: Fixed the typo, $n = 1$, not $n = 2$. Thanks to those who pointed this out.

• thanks, but you are using $0^0=1$ ? – mahjong grandmaster Jun 14 '16 at 17:45
• Here n=2 means $0^0+1^1+2^2$=6 – mahjong grandmaster Jun 14 '16 at 17:46
• It seems reasonable that there are infinitely many; if we work out the heuristics, the sequence grows as $O(n^n)$. The probability of a "random" number $n$ being prime is roughly $\frac{1}{\log(n)}$. So, the probability of the $k^{th}$ term being prime is then $O\left(\frac{1}{k\log(k)}\right)$. Summing up these expected values gives that we expect infinitely many. (Obviously, this argument fails to really establish anything since primes aren't distributed randomly and it doesn't rule out some conspiracy causing there to be only finitely many primes, but it serves as an intuitive check) – Milo Brandt Jun 14 '16 at 17:50
• @mahjonggrandmaster I think this answer does use convention that you have, but just has $n=2$ wrong - checking with Mathematica, I get that $n=1,\,52,\,124,\,431$ are all prime. – Milo Brandt Jun 14 '16 at 17:54
• @MiloBrandt, Okay thanks for that verifications ! – mahjong grandmaster Jun 14 '16 at 17:56

Edit: more or less the same as Hans Engler's answer, without the small issue $n=2$.

In Mathematica, because I will not do it by hand:

> f[n_] := 1 + Sum[k^k, {k, 1, n}]
> DiscretePlot[If[PrimeQ[f[n]], 1, 0], {n, 1, 500}]


   > PrimeQ[f[52]]
True


So yes, "there exist prime number of such form after the trivial one $2$."