OFFSET
1,1
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
Prime_1 - semiprime_1 = 2 - 4 = -2, prime_2 - semiprime_2 = 3 - 6 = -3, prime_3 - semiprime_3 = 5 - 9 = -4, etc.
MATHEMATICA
nn=250; Module[{pr=Prime[Range[nn]], sp=Select[Range[nn], PrimeOmega[ #]==2&], len}, len=Min[nn, Length[sp]]; #[[1]]-#[[2]]&/@ Thread[ {Take[ pr, len], Take[sp, len]}]](* Harvey P. Dale, Aug 14 2013 *)
PROG
(PARI) m=0; for (n=4, 250, if (bigomega(n) == 2, m = m + 1; print1(prime(m) - n, ", ")))
(PARI) n=m=0; for (k=1, 10^9, if (bigomega(k) != 2, next); m = m + 1; write("b065870.txt", n++, " ", prime(m) - k); if (n==1000, return) ) \\ Harry J. Smith, Nov 02 2009
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Robert A. Stump (bee_ess107(AT)yahoo.com), Dec 07 2001
EXTENSIONS
More terms from Rick L. Shepherd, Mar 09 2002
STATUS
approved