login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A085970
Number of integers ranging from 2 to n that are not prime-powers.
17
0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 5, 5, 6, 6, 7, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 15, 16, 17, 17, 18, 19, 20, 20, 21, 21, 22, 23, 24, 24, 25, 25, 26, 27, 28, 28, 29, 30, 31, 32, 33, 33, 34, 34, 35, 36, 36, 37, 38, 38, 39, 40, 41, 41, 42, 42, 43
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
FORMULA
a(n) = Max{A024619(k)<=n} k;
a(n) = n - A065515(n) = A085972(n) - A000720(n).
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
The complement is counted by A065515, without 1's A025528.
For primes instead of prime-powers we have A065855, with 1's A062298.
Partial sums of A143731.
The version not treating 1 as a prime-power is A356068.
A000688 counts factorizations into prime-powers.
A001222 counts prime-power divisors.
A246655 lists the prime-powers (A000961 includes 1), towers A164336.
Sequence in context: A285759 A365740 A082997 * A355538 A238884 A066683
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