OFFSET
1,3
FORMULA
a(n)=prime(n+2)-semiprime(n).
MATHEMATICA
Module[{nn=80, sem, len}, sem=Select[Range[3*nn], PrimeOmega[#]==2&]; len= Min[nn, Length[sem]]; #[[1]]-#[[2]]&/@Thread[{Take[Prime[Range[ 3, nn+2]], len], Take[sem, len]}]] (* Harvey P. Dale, Sep 04 2015 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Apr 11 2010, May 17 2010
EXTENSIONS
a(6) corrected by R. J. Mathar, Apr 16 2010
Corrected and extended by Harvey P. Dale, Sep 04 2015
STATUS
approved