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.

Showing 1-5 of 5 results.

A069637 Number of prime powers <= n with exponents > 1.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10
Offset: 1

Views

Author

Amarnath Murthy, Mar 27 2002

Keywords

Comments

Counts A025475 without 1 = prime^0: a(n) = A085501(n) - 1. - Reinhard Zumkeller, Jul 03 2003
Counts the prime powers (A246655) without the primes. - Peter Luschny, Nov 18 2019

References

  • H. Sahu, K. Kar and B.S.K.R. Somayajulu, On the average order of pi*(n) - pi(n), Acta Cienc. Indica Math., Vol. 11 (1985), pp. 165-168.
  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Chapter VII, p. 237.

Crossrefs

Partial sums of A268340.

Programs

  • Maple
    with(numtheory);
    A069637 := proc(N) local ct,i; ct:=0;
    for i from 1 to N do if not isprime(i) and nops(factorset(i))=1 then ct:=ct+1; fi; od; ct; end; # N. J. A. Sloane, Jun 05 2022
  • Mathematica
    Table[Sum[PrimePi[n^(1/k)], {k, Log[2, n]}]-PrimePi[n],{n,94}] (* Stefano Spezia, Jun 05 2022 *)
  • Python
    from sympy import primepi, integer_nthroot
    def A069637(n): return sum(primepi(integer_nthroot(n,k)[0]) for k in range(2,n.bit_length())) # Chai Wah Wu, Aug 15 2024
  • SageMath
    [A025528(n) - prime_pi(n)  for n in (1..100)] # Peter Luschny, Nov 18 2019
    

Formula

a(n) = A025528(n) - A000720(n) = A000720([n^(1/2)]) + A000720([n^(1/3)]) + ... . - Max Alekseyev, May 11 2009
Sum_{k=1..n} a(k) ~ (4/3) * n^(3/2)/log(n) + O(n^(3/2)/log(n)^2) (Sahu et al., 1985). - Amiram Eldar, Mar 07 2021

A085818 For n > 1: a(n) = p if n = p^e with p prime and e > 1, otherwise a(n) = (n-m)-th prime, where m = number of nonprime prime powers <= n; a(1)=1.

Original entry on oeis.org

1, 2, 3, 2, 5, 7, 11, 2, 3, 13, 17, 19, 23, 29, 31, 2, 37, 41, 43, 47, 53, 59, 61, 67, 5, 71, 3, 73, 79, 83, 89, 2, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 7, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 04 2003

Keywords

Comments

a(n) = A025473(n) if n = p^e with p prime and e > 1, otherwise a(n) = A008578(n-A085501(n));
n divides A085819(n) = Product_{k<=n} a(k), as by construction: a(1)=1; if n divides A085819(n-1) then a(n) = smallest prime not occurring earlier; if n does not divide A085819(n-1) then a(n) = greatest prime factor of n (A006530);
A000040 occurs infinitely many times as a subsequence.
a(A085971(n))=A000040(n) and for all k > 1: a(A000040(n)^k)=A000040(n); A085985(n)=A049084(a(n)). - Reinhard Zumkeller, Jul 06 2003

Crossrefs

Programs

  • PARI
    f(n) = 1 + sum(k=2, n, isprimepower(k) && !isprime(k));  \\ A085501
    a(n) = {if (n==1, return (1)); my(p); if (isprimepower(n, &p) && !isprime(n), p, prime(n-f(n)));} \\ Michel Marcus, Jan 28 2021
    
  • Python
    from sympy import primefactors, prime, primepi, integer_nthroot
    def A085818(n): return 1 if n==1 else (f[0] if len(f:=primefactors(n))==1 and f[0]Chai Wah Wu, Aug 20 2024

A085972 Number of numbers <= n that are primes or not prime powers.

Original entry on oeis.org

0, 1, 2, 2, 3, 4, 5, 5, 5, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 20, 21, 22, 23, 24, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 54, 55, 56, 57, 58, 59, 60, 61
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 06 2003

Keywords

Comments

a(n) = Max{k: A085971(k)<=n};
a(n) = n-A085501(n) = A000720(n)+n-A065515(n) = A085970(n)+A000720(n).

Programs

  • Mathematica
    Accumulate[Table[If[PrimeQ[n]||(!PrimePowerQ[n]),1,0],{n,80}]]-1 (* Harvey P. Dale, Oct 13 2022 *)
  • Python
    from sympy import primepi, integer_nthroot
    def A085972(n): return n-1-sum(primepi(integer_nthroot(n,k)[0]) for k in range(2,n.bit_length())) # Chai Wah Wu, Aug 20 2024

A085819 a(n) = Product_{k<=n} A085818(k).

Original entry on oeis.org

1, 2, 6, 12, 60, 420, 4620, 9240, 27720, 360360, 6126120, 116396280, 2677114440, 77636318760, 2406725881560, 4813451763120, 178097715235440, 7302006324653040, 313986271960080720, 14757354782123793840
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 04 2003

Keywords

Comments

n divides a(n), see A085818.

Crossrefs

Programs

  • PARI
    f(n) = 1 + sum(k=2, n, isprimepower(k) && !isprime(k));  \\ A085501
    b(n) = {if (n==1, return (1)); my(p); if (isprimepower(n, &p) && !isprime(n), p, prime(n-f(n))); } \\ A085818
    a(n) = prod(k=1, n, b(k)); \\ Michel Marcus, Jul 13 2021

A327247 Number of odd prime powers <= n (with exponents > 0).

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 24, 24, 24
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 14 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Boole[OddQ[k] && PrimePowerQ[k]], {k, 1, n}], {n, 1, 75}]
  • PARI
    a(n) = {sum(k=2, primepi(n), logint(n, prime(k)))} \\ Andrew Howroyd, Sep 14 2019

Formula

a(n) = A025528(n) - A000523(n).
Showing 1-5 of 5 results.