OFFSET
1,1
EXAMPLE
2 is in the sequence because there is no semiprime between the two primes 1^2 + 1 = 2 and 2^2 + 1 = 5 of the form k^2 + 1.
2917 is in the sequence because there is no semiprime between the two primes 54^2 + 1 = 2917 and 56^2 + 1 = 3127 : 55^2 + 1 = 3026 = 2*17*89 is not a semiprime.
MAPLE
with(numtheory):nn:=2000: lst:={}:
for n from 1 to nn do:
if type(n^2+1, prime)=true
then
lst:=lst union {n}:
else
fi:
od:
n1:=nops(lst):
for m from 1 to n1-1 do:
i1:=lst[m]:i2:=lst[m+1]:ii:=0:
for k from i1+1 to i2-1 do:
x:=k^2+1:y:=factorset(x):
if bigomega(x)=2 and nops(y)=2
then
ii:=ii+1:
else
fi:
od:
if ii=0
then
printf(`%d, `, i1^2+1):
else
fi:
od:
PROG
(PARI)
for(n=1, 10^4, if(isprime(n^2+1), k=1; while(!isprime((n+k)^2+1), k++); c=0; for(i=1, k-1, d=factor((n+i)^2+1); s=sum(j=1, #d[, 1], d[j, 2]); if(s==2, c++; break)); if(c==0, print1(n^2+1, ", ")))) \\ Derek Orr, Aug 15 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 15 2014
STATUS
approved