login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A100408
Numbers n such that n^n-2 is prime.
8
2, 7, 19, 21, 25, 49, 51, 1071
OFFSET
1,1
COMMENTS
Except for the first term all terms are odd.
Numbers n such that n^n+7 is prime gives the (as yet) too-short sequence 2,4,6,32,...
If it exists, a(9) > 25000. - Robert Price, Apr 25 2019
EXAMPLE
51 is in the sequence because 51^51-2 is prime. 1071^1071-2 is a probable prime.
MATHEMATICA
Do[If[PrimeQ[n^n-2], Print[n]], {n, 1111}]
Select[Range[1111], PrimeQ[#^#-2]&] (* Harvey P. Dale, Dec 08 2024 *)
PROG
(PARI) is(n)=ispseudoprime(n^n-2) \\ Charles R Greathouse IV, Feb 20 2017
CROSSREFS
Cf. A100407.
Sequence in context: A218684 A337614 A343908 * A259370 A103034 A038952
KEYWORD
more,nonn
AUTHOR
Farideh Firoozbakht, Nov 19 2004
STATUS
approved