cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A085970 Number of integers ranging from 2 to n that are not prime-powers.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 06 2003

Keywords

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

Examples

			The a(30) = 13 numbers: 6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 30. - _Gus Wiseman_, Jul 28 2022
		

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.

Programs

  • 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 *)
  • 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

Formula

a(n) = Max{A024619(k)<=n} k;
a(n) = n - A065515(n) = A085972(n) - A000720(n).

Extensions

Name modified by Gus Wiseman, Jul 28 2022. Normally 1 is not considered a prime-power, cf. A000961, A246655.