%I #17 Aug 21 2022 09:22:04
%S 0,1,0,2,0,1,0,0,2,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,0,0,0,2,1,0,0,0,
%T 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,
%U 0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0
%N Number of prime powers in all composite numbers between n-th prime and next prime.
%C The maximum value of terms in the sequence, through the (10^5)th term, is 2. - _Harvey P. Dale_, Aug 24 2014
%H Harvey P. Dale, <a href="/A080101/b080101.txt">Table of n, a(n) for n = 1..1000</a>
%e There are two prime powers between 2179=A000040(327) and 2203=A000040(328): 2187=3^7 and 2197=13^3, therefore a(327)=2, A080102(327)=2187 and A080103(327)=2197.
%p a := proc(n) local c, k, p: c, p := 0, ithprime(n): for k from p+1 to nextprime(p)-1 do if nops(numtheory:-factorset(k)) = 1 then c := c+1: fi: od: c: end:
%p seq(a(n), n = 1 .. 105); # _Lorenzo Sauras Altuzarra_, Jul 08 2022
%t prpwQ[n_]:=Module[{fi=FactorInteger[n]},Length[fi]==1&&fi[[1,2]]>1]; nn=600;With[{pwrs=Table[If[prpwQ[n],1,0],{n,nn}]},Table[Total[ Take[ pwrs,{Prime[n],Prime[n+1]}]],{n,PrimePi[nn]-1}]] (* _Harvey P. Dale_, Aug 24 2014 *)
%Y Cf. A080102, A080103, A025475, A000961.
%K nonn
%O 1,4
%A _Reinhard Zumkeller_, Jan 28 2003
|