login

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”).

A176705
Number of semiprimes between single (or isolated or non-twin) prime(n) and single (or isolated or non-twin) prime(n+1).
1
8, 5, 3, 2, 5, 3, 1, 3, 4, 2, 6, 1, 8, 3, 1, 1, 12, 7, 1, 4, 2, 2, 3, 4, 7, 2, 6, 2, 3, 2, 3, 1, 1, 2, 1, 4, 1, 2, 7, 0, 3, 3, 2, 4, 3, 1, 2, 2, 1, 12, 3, 3, 2, 3, 4, 2, 1, 1, 5, 3, 1, 5, 1, 2, 3, 5, 3, 3, 2, 1, 2, 0, 3, 2, 1, 3, 1, 4, 4, 11, 5, 1, 4, 3, 7, 0, 3, 4, 2, 1, 1, 2, 5, 0, 2, 2, 2, 2, 4, 1, 3, 9, 5, 1, 2
OFFSET
1,1
EXAMPLE
a(1)=8 because are 8 semiprimes (4, 6, 9, 10, 14, 15, 21, 22) between A007510(1)=2 and A007510(2)=23.
MAPLE
From R. J. Mathar, Apr 26 2010: (Start)
isA001358 := proc(n) numtheory[bigomega](n) = 2 ; end proc:
A176705 := proc(n) a :=0 ; for k from A007510(n) to A007510(n+1) do if isA001358(k) then a := a+1 ; end if; end do: return a ; end proc:
seq(A176705(n), n=1..120) ; (End)
MATHEMATICA
nsps[lst_]:=Module[{s=lst[[1]]+1, t=lst[[2]]-1}, Count[Range[s, t], _?(PrimeOmega[ #] == 2&)]]; With[{ip=DeleteCases[Prime[Range[200]], _?(AnyTrue[{#-2, #+2}, PrimeQ]&)]}, nsps/@Partition[ip, 2, 1]] (* The program uses the function AnyTrue from Mathematica version 10 *) (* Harvey P. Dale, Aug 13 2014 *)
CROSSREFS
Sequence in context: A196515 A116397 A275306 * A140133 A086723 A011406
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(4), a(13), a(55) corrected by R. J. Mathar, Apr 26 2010
STATUS
approved