login
Number of semiprimes between single (or isolated or non-twin) prime(n) and single (or isolated or non-twin) prime(n+1).
1

%I #11 Feb 06 2019 00:44:42

%S 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,

%T 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,

%U 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

%N Number of semiprimes between single (or isolated or non-twin) prime(n) and single (or isolated or non-twin) prime(n+1).

%e a(1)=8 because are 8 semiprimes (4, 6, 9, 10, 14, 15, 21, 22) between A007510(1)=2 and A007510(2)=23.

%p From _R. J. Mathar_, Apr 26 2010: (Start)

%p isA001358 := proc(n) numtheory[bigomega](n) = 2 ; end proc:

%p 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:

%p seq(A176705(n),n=1..120) ; (End)

%t 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 *)

%Y Cf. A001097, A007510.

%K nonn

%O 1,1

%A _Juri-Stepan Gerasimov_, Apr 24 2010

%E a(4), a(13), a(55) corrected by _R. J. Mathar_, Apr 26 2010