OFFSET
0,2
LINKS
Michel Lagneau, Table of n, a(n) for n = 0..325
EXAMPLE
a(0) = 1 because 1^2+1 is prime.
a(1) = 3 because 3^2+1 is composite, but 4^2+1 is prime.
a(2) = 8 because 8^2+1, 9^2+1 are composites, but 10^2+1 is prime.
a(3) = 7 because 7^2+1, 8^2+1 and 9^2+1 are composites, but 10^2+1 is prime.
MAPLE
for n from 0 to 60 do: ii:=0:for k from 1 to 10^8 while(ii=0) do:i:=0:for m from 0 to n while(type((k+m)^2+1, prime)=false ) do :i:=i+1:od:if i=n then ii:=1: printf(`%d, `, k):else fi:od:od:
MATHEMATICA
nn = 50; t = Table[0, {nn}]; cnt = 0; k = 0; While[cnt < nn, k++; i = 0; While[! PrimeQ[(k + i)^2 + 1], i++]; If[i < nn && t[[i + 1]] == 0, t[[i + 1]] = k; cnt++]]; t (* T. D. Noe, Dec 10 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Dec 09 2013
STATUS
approved