OFFSET
1,1
COMMENTS
EXAMPLE
a(1) = 7 because there are 7 1-digit numbers that are prime powers: 2=2^1, 3=3^1, 4=2^2, 5=5^1, 7=7^1, 8=2^3, and 9=3^2.
a(2) = 28 because there are 28 2-digit prime powers: the 21 2-digit primes (11, 13, ..., 97), 2 squares of primes (25=5^2 and 49=7^2), 1 cube of a prime (27=3^3), 2 fourth powers of primes (16=2^4 and 81=3^4), 1 fifth power of a prime (32=2^5), and 1 sixth power of a prime (64=2^6).
MATHEMATICA
Prepend[Differences@ #, First@ #] &@ Array[Sum[PrimePi[10^(#/k)], {k, # Log2@ 10}] &, 12] (* Michael De Vlieger, May 20 2018, after Robert G. Wilson v at A267712 *)
PROG
(Magma) /* gives first 9 terms */ a:=[]; for n in [1..9] do tMin:=10^(n-1); tMax:=10^n-1; c:=0; for k in [1..Floor(Log(2, tMax))] do pMin:=Ceiling(tMin^(1/k)); pMax:=Floor(tMax^(1/k)); if pMin le pMax then c+:=#PrimesInInterval(pMin, pMax); end if; end for; a[n]:=c; end for; a;
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jon E. Schoenfield, May 13 2018
STATUS
approved