OFFSET
1,3
COMMENTS
Leonhard Euler published this prime-generating formula in 1772. - Harvey P. Dale, Sep 23 2020
REFERENCES
T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 6.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A056561(n-1) + 1, n > 1. - Robert Price, Nov 08 2019
MAPLE
A002837:=n->`if`(isprime(n^2-n+41), n, NULL): seq(A002837(n), n=0..100); # Wesley Ivan Hurt, Oct 21 2014
MATHEMATICA
Select[Range[0, 100], PrimeQ[#^2-#+41]&] (* Harvey P. Dale, May 27 2012 *)
PROG
(PARI) v=[ ]; for(n=0, 100, if(isprime(n^2-n+41), v=concat(v, n), )); v
(Magma) [n: n in [0..100] |IsPrime(n^2-n+41)]; // Vincenzo Librandi, Nov 21 2010
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
STATUS
approved