cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A100408 Numbers n such that n^n-2 is prime.

Original entry on oeis.org

2, 7, 19, 21, 25, 49, 51, 1071
Offset: 1

Views

Author

Farideh Firoozbakht, Nov 19 2004

Keywords

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

Examples

			51 is in the sequence because 51^51-2 is prime. 1071^1071-2 is a probable prime.
		

Crossrefs

Cf. A100407.

Programs

  • Mathematica
    Do[If[PrimeQ[n^n-2], Print[n]], {n, 1111}]
    Select[Range[1111],PrimeQ[#^#-2]&] (* Harvey P. Dale, Dec 08 2024 *)
  • PARI
    is(n)=ispseudoprime(n^n-2) \\ Charles R Greathouse IV, Feb 20 2017