OFFSET
1,1
COMMENTS
The next term is > 5000.
EXAMPLE
a(2) = 3 because (3+1)^3 - 3^3 = 4^3 - 3^3 = 64 - 27 = 37 is prime.
MATHEMATICA
Select[Range[300], PrimeQ[(#+1)^#-#^#]&] (* Vladimir Joseph Stephan Orlovsky, Mar 03 2011 *)
PROG
(Magma) [n: n in [0..190]| IsPrime((n+1)^n -n^n)]; // Vincenzo Librandi, Jun 22 2014
(PARI) isok(k) = ispseudoprime((k+1)^k - k^k); \\ Jinyuan Wang, Mar 19 2020
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Hugo Pfoertner, Sep 14 2004
STATUS
approved