OFFSET
1,1
FORMULA
a(n) = A238815(n) - 1. - Jon E. Schoenfield, Apr 19 2018
EXAMPLE
For n=1, there are 4 primes plus 3 prime powers less than 10^1: 2, 3, 4, 5, 7, 8, 9; 7 in total.
MATHEMATICA
Table[Count[Range[10^n], k_ /; PrimePowerQ@ k], {n, 6}] (* Michael De Vlieger, Jan 20 2016 *)
f[n_] := Sum[PrimePi[10^(n/k)], {k, n*Log2[10]}]; Array[f, 14] (* Robert G. Wilson v, Aug 17 2017, after Giovanni Resta in A267574 *)
PROG
(SageMath)
def A267712(n):
gen = (p for p in srange(2, 10^n) if p.is_prime_power())
return sum(1 for _ in gen)
print([A267712(n) for n in range(1, 7)]) # Peter Luschny, Sep 16 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Daniel Mondot, Jan 19 2016
EXTENSIONS
a(20)-a(26) from Chai Wah Wu, Jan 25 2016
STATUS
approved