A328003 a(n) = ppi(2*n) - ppi(n). Number of prime powers (A246655) in the interval (n, 2*n]. See comments.
0, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 4, 5, 5, 6, 7, 8, 7, 7, 7, 7, 8, 9, 8, 9, 9, 9, 9, 9, 8, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 12, 12, 13, 13, 12, 12, 12, 12, 13, 14, 13, 14, 15, 15, 16, 16, 15, 15, 15, 15, 16, 17, 17, 18, 17, 17, 18, 19, 18, 18
Offset: 0
Keywords
Programs
-
Mathematica
Table[Count[Range[n+1,2n],?PrimePowerQ],{n,0,80}] (* _Harvey P. Dale, Aug 01 2020 *)
-
SageMath
def a(n) : return sum([1 for k in (n+1..2*n) if is_prime_power(k)]) print([a(n) for n in (0..72)])
Comments