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.

A380403 Number of integers k that are neither squarefree nor prime powers (in A126706) and that do not exceed primorial A002110(n).

Original entry on oeis.org

0, 0, 0, 5, 67, 871, 11693, 199976, 3802411, 87466676, 2536583089, 78634293907, 2909470106300, 119288281458176, 5129396144497507, 241081619059363357, 12777325812023481231, 753862222923258499554
Offset: 0

Views

Author

Michael De Vlieger, Jan 23 2025

Keywords

Examples

			Let s = A126706 and let P(n) = A002110(n).
a(0..2) = 0 since P(0..2) = {1, 2, 6}, and the smallest number in s is 12.
a(3) = 5 since P(3) = 30, and the set s(1..6) = {12, 18, 20, 24, 28} contains k <= 30.
a(4) = 67 since P(4) = 210, and the set s(1..67) = {12, 18, 20, ..., 207, 208} contains k <= 210, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[# - Sum[PrimePi@ Floor[#^(1/k)], {k, 2, Floor[Log2[#]]}] - Sum[MoebiusMu[k]*Floor[#/(k^2)], {k, Floor[Sqrt[#]]}] &[Product[Prime[i], {i, n}]], {n, 0, 12}]
  • PARI
    a(n) = my(q=vecprod(primes(n))); q - sum(k=2, logint(q, 2), primepi(sqrtnint(q, k))) - sum(k=1, sqrtint(q), q\k^2*moebius(k)); \\ Jinyuan Wang, Feb 25 2025
  • Python
    from math import isqrt
    from sympy import primorial, primepi, integer_nthroot, mobius
    def A380403(n):
        if n == 0: return 0
        m = primorial(n)
        return int(-sum(primepi(integer_nthroot(m,k)[0]) for k in range(2,m.bit_length()))-sum(mobius(k)*(m//k**2) for k in range(2, isqrt(m)+1))) # Chai Wah Wu, Jan 24 2025
    

Formula

a(n) = P(n) - (Sum_{k=2..floor(log_2(P(n)))} pi(floor(P(n)^(1/k)))) - Sum_{k=1..floor(sqrt(P(n)))} mu(k)*floor(P(n)/(k^2)), where P(n) = A002110(n).
a(n) = A002110(n) - A380402(n) - A158341(n) - 1.

Extensions

Offset changed to 0 by Jinyuan Wang, Jan 24 2025
a(16) from Chai Wah Wu, Jan 24 2025
a(17) from Chai Wah Wu, Jan 25 2025