login
A328003
a(n) = ppi(2*n) - ppi(n). Number of prime powers (A246655) in the interval (n, 2*n]. See comments.
0
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,3
COMMENTS
The sequence counts prime powers greater than n up to and including 2*n. - Harvey P. Dale, Aug 01 2020
MATHEMATICA
Table[Count[Range[n+1, 2n], _?PrimePowerQ], {n, 0, 80}] (* Harvey P. Dale, Aug 01 2020 *)
PROG
(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)])
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Nov 18 2019
STATUS
approved