

A058911


Numbers k such that k^k + k + 1 is prime.


3




OFFSET

1,3


COMMENTS



LINKS



EXAMPLE

a(2) = 2 because 2^2 + 2 + 1 = 7.


MATHEMATICA

Do[ If[ PrimeQ[ n^n + n + 1], Print[n]], {n, 1, 700} ]
Join[{0}, Select[Range[470], PrimeQ[#^#+#+1]&]] (* Harvey P. Dale, Dec 11 2022 *)


PROG

(PARI) f2(n, k) = for(x=1, n, y=x^x+x+k; if(ispseudoprime(y), print1(x", "))) \\ Cino Hilliard, Jan 07 2005
(PFGW) ABC2 $a^$a + $a + 1


CROSSREFS



KEYWORD

nonn,hard,more


AUTHOR



STATUS

approved



