OFFSET
1,2
COMMENTS
By convention, a(1) = 0 because there are no composite number of the form m^2+1 between A002496(1)=2 and A002496(2)=5.
a(n) = 0 when all divisors of the numbers of the form m^2+1 between the primes A002496(n) and A002496(n+1) already exist in the sequence.
Note that a(n) = 0 for n = 1, 62, 149, 257, 281, 286,...(see A238138).
LINKS
Michel Lagneau, Table of n, a(n) for n = 1..5000
EXAMPLE
MAPLE
with(numtheory):lst:={}: lst2:={}:T:=array(1..2000):kk:=1:k:=0:for n from 2 by 2 to 500 do: p:=n^2+1:if type(p, prime)=true then k:=k+1:T[k]:=p:else fi:od:for i from 1 to k-1 do:lst1:={}:a:=sqrt(T[i]-1):b:=sqrt(T[i+1]-1):for j from a+1 to b-1 do:y:=factorset(j^2+1):lst1:=lst1 union y:od:lst1:=lst1 minus lst: if lst1<>{} then kk:=kk+1: printf(`%d, `, lst1[1]):lst:=lst union {lst1[1]}:else kk:=kk+1: printf(`%d, `, 0):fi:od:
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Feb 18 2014
STATUS
approved