%I #37 Aug 20 2024 12:22:11
%S 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,
%T 13,13,14,15,16,17,17,18,19,20,20,21,21,22,23,24,24,25,25,26,27,28,28,
%U 29,30,31,32,33,33,34,34,35,36,36,37,38,38,39,40,41,41,42,42,43
%N Number of integers ranging from 2 to n that are not prime-powers.
%C 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
%C Number of terms of A024619 <= n. - _Felix Fröhlich_, Dec 10 2016
%C First differs from A082997 at n = 30. - _Gus Wiseman_, Jul 28 2022
%H Felix Fröhlich, <a href="/A085970/b085970.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = Max{A024619(k)<=n} k;
%F a(n) = n - A065515(n) = A085972(n) - A000720(n).
%e The a(30) = 13 numbers: 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 30. - _Gus Wiseman_, Jul 28 2022
%t With[{nn = 75}, Table[n - Count[#, k_ /; k < n] - 1, {n, nn}] &@ Join[{1}, Select[Range@ nn, PrimePowerQ]]] (* _Michael De Vlieger_, Dec 11 2016 *)
%o (PARI) a(n) = my(i=0); forcomposite(c=4, n, if(!isprimepower(c), i++)); i \\ _Felix Fröhlich_, Dec 10 2016
%o (Python)
%o from sympy import primepi, integer_nthroot
%o 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
%Y Cf. A000720, A024619, A085972.
%Y The complement is counted by A065515, without 1's A025528.
%Y For primes instead of prime-powers we have A065855, with 1's A062298.
%Y Partial sums of A143731.
%Y The version not treating 1 as a prime-power is A356068.
%Y A000688 counts factorizations into prime-powers.
%Y A001222 counts prime-power divisors.
%Y A246655 lists the prime-powers (A000961 includes 1), towers A164336.
%Y Cf. A023893, A023894, A036234, A069513, A207375, A354911, A355743, A356064, A356065.
%K nonn
%O 1,10
%A _Reinhard Zumkeller_, Jul 06 2003
%E Name modified by _Gus Wiseman_, Jul 28 2022. Normally 1 is not considered a prime-power, cf. A000961, A246655.