Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #10 Aug 21 2014 22:49:15
%S 2,2917,13457,15377,15877,21317,78401,147457,190097,215297,217157,
%T 287297,401957,414737,577601,1299601,1308737,1313317,1378277,1547537,
%U 1623077,1664101,1731857,1742401,1822501,1887877,1976837,2044901,2390117,2421137,2446097,2483777
%N First of two consecutive (primes of the form n^2+1) with no semiprime of the same form between them.
%e 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.
%e 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.
%p with(numtheory):nn:=2000: lst:={}:
%p for n from 1 to nn do:
%p if type(n^2+1,prime)=true
%p then
%p lst:=lst union {n}:
%p else
%p fi:
%p od:
%p n1:=nops(lst):
%p for m from 1 to n1-1 do:
%p i1:=lst[m]:i2:=lst[m+1]:ii:=0:
%p for k from i1+1 to i2-1 do:
%p x:=k^2+1:y:=factorset(x):
%p if bigomega(x)=2 and nops(y)=2
%p then
%p ii:=ii+1:
%p else
%p fi:
%p od:
%p if ii=0
%p then
%p printf(`%d, `,i1^2+1):
%p else
%p fi:
%p od:
%o (PARI)
%o 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
%Y Cf. A002496, A005574.
%K nonn
%O 1,1
%A _Michel Lagneau_, Aug 15 2014