OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
39 is in the sequence because 39 = 3*13, the next semiprime is 46 = 2*23, and 46-39 = 7 is prime.
MATHEMATICA
L=Select[Range@370, PrimeOmega@# == 2 &]; Pick[Most@L, PrimeQ@ Differences@ L] (* Giovanni Resta, Apr 25 2016 *)
PROG
(PARI) proxsem(n)=local(p, s, r); s=0; p=n; while(s==0, p+=1; if(bigomega(p)==2, s=1; r=p)); p
{for(i=1, 400, if(bigomega(i)==2, a=proxsem(i)-i; if(isprime(a), print1(i, ", "))))}
(PARI) list(lim)=my(v=List(), u=v); lim\=1; while(bigomega(lim++)!=2, ); forprime(p=2, lim\2, forprime(q=2, lim\p, listput(v, p*q))); v=Set(v); for(i=1, #v-1, if(isprime(v[i+1]-v[i]), listput(u, v[i]))); Set(u) \\ Charles R Greathouse IV, Apr 29 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Antonio Roldán, Apr 25 2016
STATUS
approved