OFFSET
1,2
COMMENTS
n^2+n+41: Euler’s prime generating polynomial.
First 6 terms in the sequence are first 6 consecutive squares.
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..4285
EXAMPLE
9 is in the sequence because 9 = 3^2 and 9^2+9+41 = 131 is prime.
36 is in the sequence because 36 = 6^2 and 36^2+36+41 = 1373 is prime.
MAPLE
with(numtheory):KD := proc() local a, b; a:=(n^2); b:=a^2+a+41; if isprime(b) then RETURN (a); fi; end: seq(KD(), n=1..500);
MATHEMATICA
Select[Table[k = n^2, {n, 100}], PrimeQ[#^2 + # + 41] &] (* or *) c = 0; Do[k = n^2; If[PrimeQ[k^2 + k + 41], c = c + 1; Print[c, " ", k]], {n, 1, 10000}];
Select[Range[100]^2, PrimeQ[#^2+#+41]&] (* Harvey P. Dale, Dec 13 2021 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Feb 20 2014
STATUS
approved