A054463 Numbers k such that (k+1)^k - k^(k-1) is prime.
2, 5, 6, 9, 24, 595
Offset: 1
Programs
-
Mathematica
Select[Range[1000], PrimeQ[(# + 1)^# - #^(# - 1)] &] (* Vincenzo Librandi, Sep 27 2012 *)
-
PARI
xp1toxp1(n)= { my(y); forstep(x=2,n,1, y=(x+1)^x - x^(x-1); if(ispseudoprime(y), print1(x, ", "))); }
Extensions
a(6) from Vincenzo Librandi, Sep 27 2012
Comments