login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A065797 Numbers n such that n^n - n + 1 is prime. 0
2, 5, 13, 155, 1551, 1841, 2167, 2560 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The Mathematica program tests for probable primality. It is unclear which of the numbers n^n - n + 1 have been proved prime. - Dean Hickerson, Apr 26 2003

The first four terms result from deterministic primality tests, while terms >= 156 currently correspond to probable primes. - Giuseppe Coppoletta, Dec 26 2014

LINKS

Table of n, a(n) for n=1..8.

Eric W. Weisstein, Primality Test, MathWorld

MAPLE

select(n -> isprime(n^n-n+1), [$1..3000]); # Robert Israel, Dec 29 2014

MATHEMATICA

Do[If[PrimeQ[n^n-n+1], Print[n]], {n, 1, 3000}]

PROG

(Sage) [n for n in (1..155) if (n^n-n+1).is_prime(proof=true)] #deterministic test

(Sage) [n for n in (1..5000) if (n^n-n+1).is_prime(proof=false)] #probabilistic test ## Giuseppe Coppoletta, Dec 26 2014

(PARI) is(n)=ispseudoprime(n^n-n+1) \\ Charles R Greathouse IV, Jun 13 2017

CROSSREFS

Cf. A058911 (n^n+n+1).

Sequence in context: A241248 A275698 A186450 * A196273 A128772 A272106

Adjacent sequences:  A065794 A065795 A065796 * A065798 A065799 A065800

KEYWORD

nonn

AUTHOR

Robert G. Wilson v, Dec 05 2001

EXTENSIONS

More terms from John Sillcox (JMS21187(AT)aol.com), Apr 23 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 18 09:53 EST 2019. Contains 329261 sequences. (Running on oeis4.)