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-3 of 3 results.

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

A380430 Number of powerful numbers k that are not powers of primes (i.e., k is in A286708) that do not exceed the primorial number A002110(n).

Original entry on oeis.org

0, 0, 0, 0, 7, 50, 254, 1245, 5898, 29600, 163705, 925977, 5690175, 36681963, 241663896, 1662446097, 12134853382, 93406989325, 730785520398, 5990426525483, 50538885715526, 432266550168097, 3845700235189327, 35065304557027821, 334652745159828239, 3262707438761612651
Offset: 0

Views

Author

Michael De Vlieger, Jan 24 2025

Keywords

Examples

			Let P = A002110 and let s = A286708 = A001694 \ A246547 \ {1}.
a(0..3) = 0 since the smallest number in s is 36.
a(4) = 7 since P(4) = 210 and numbers in s that are less than 210 include {36, 72, 100, 108, 144, 196, 200}, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[-1 + Sum[If[MoebiusMu[j] != 0, Floor[Sqrt[#/j^3]], 0], {j, #^(1/3)}] - Sum[PrimePi@ Floor[#^(1/k)], {k, 2, Floor[Log2[#]]}] &[Product[Prime[i], {i, n}]], {n, 0, 12} ]
  • Python
    from math import isqrt
    from sympy import primorial, primepi, integer_nthroot, mobius
    def A380430(n):
        def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
        if n == 0: return 0
        m = primorial(n)
        c, l, j = int(squarefreepi(integer_nthroot(m, 3)[0])-sum(primepi(integer_nthroot(m,k)[0]) for k in range(2,m.bit_length()))-1), 0, isqrt(m)
        while j>1:
            k2 = integer_nthroot(m//j**2,3)[0]+1
            w = squarefreepi(k2-1)
            c += j*(w-l)
            l, j = w, isqrt(m//k2**3)
        return c-l # Chai Wah Wu, Feb 25 2025

Formula

a(n) = A380254(n) - A380402(n) - 1.
a(n) <= A380403(n) since A286708 is a proper subset of A126706.

A380404 Number of prime powers that do not exceed the primorial number A002110(n).

Original entry on oeis.org

0, 1, 4, 16, 60, 377, 3323, 42518, 646580, 12285485, 300378113, 8028681592, 259488951722, 9414917934636, 362597756958862, 15397728568256861, 742238179325555125, 40068968503380861518, 2251262473065725514585, 139566579946046888545036
Offset: 0

Views

Author

Michael De Vlieger, Jan 24 2025

Keywords

Examples

			Let P = A002110 and let s = A246655.
a(0) = 0 since P(0) = 1, and the smallest term in s is 2.
a(1) = 1 since P(1) = 2.
a(2) = 4 since P(2) = 6 and the terms in s that do not exceed 6 are {2, 3, 4, 5}.
a(3) = 16 since P(3) = 30; the numbers 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, and 29 are less than 30, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[PrimePi[Floor[#^(1/k)]], {k, Floor@ Log2[#]}] &[Product[Prime[i], {i, n}]], {n, 0, 14}]

Formula

a(n) = Sum_{k = 1..floor(log_2(P(n)))} pi(floor(P(n)^(1/k))), where P(n) = A002110(n).
a(n) = A000849(n) + A380402(n).
Showing 1-3 of 3 results.