login
Sum of primes between n-th and (n+1)-th semiprimes.
0

%I #5 Nov 21 2013 12:49:07

%S 5,7,0,24,0,36,0,23,0,60,0,0,37,0,84,47,0,53,0,0,120,0,67,144,0,79,83,

%T 0,0,89,0,0,0,301,216,113,0,0,0,0,0,127,131,0,276,0,0,0,0,300,157,0,0,

%U 163,167,173,0,360,0,0,384,396,0,0,0,0,0,211,0,0,0,0,0,0,223,689,0,480,0

%N Sum of primes between n-th and (n+1)-th semiprimes.

%e a(1)=5 because between s(1)=4 and s(2)=6 there is one prime 5,

%e a(2)=7 because between s(2)=6 and s(3)=9 there is one prime 7,

%e a(3)=0 because between s(3)=9 and s(4)=10 there is no primes;

%e a(4)=24 because between s(4)=10 and s(5)=14 there are two primes 11 and 13 sum of which is 24, (s(n)=n-th semiprime).

%t With[{sps=Partition[Select[Range[250],PrimeOmega[#]==2&],2,1]}, Total[ Select[ Range[ First[#], Last[#]], PrimeQ]]&/@sps] (* _Harvey P. Dale_, Sep 04 2011 *)

%K nonn

%O 1,1

%A _Zak Seidov_, Dec 22 2007