OFFSET
1,10
COMMENTS
For n > 2, a(n) gives the number of duplicate eliminations performed by the Sieve of Eratosthenes when sieving the interval [2, n]. - Felix Fröhlich, Dec 10 2016
Number of terms of A024619 <= n. - Felix Fröhlich, Dec 10 2016
First differs from A082997 at n = 30. - Gus Wiseman, Jul 28 2022
LINKS
Felix Fröhlich, Table of n, a(n) for n = 1..10000
EXAMPLE
The a(30) = 13 numbers: 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 30. - Gus Wiseman, Jul 28 2022
MATHEMATICA
With[{nn = 75}, Table[n - Count[#, k_ /; k < n] - 1, {n, nn}] &@ Join[{1}, Select[Range@ nn, PrimePowerQ]]] (* Michael De Vlieger, Dec 11 2016 *)
PROG
(PARI) a(n) = my(i=0); forcomposite(c=4, n, if(!isprimepower(c), i++)); i \\ Felix Fröhlich, Dec 10 2016
(Python)
from sympy import primepi, integer_nthroot
def A085970(n): return n-1-sum(primepi(integer_nthroot(n, k)[0]) for k in range(1, n.bit_length())) # Chai Wah Wu, Aug 20 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 06 2003
EXTENSIONS
Name modified by Gus Wiseman, Jul 28 2022. Normally 1 is not considered a prime-power, cf. A000961, A246655.
STATUS
approved