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.

A158341 a(n) = A013928(A002110(n)).

Original entry on oeis.org

0, 1, 4, 18, 128, 1404, 18261, 310346, 5896727, 135624239, 3933101823, 121926157640, 4511267827531, 184961980943492, 7953365180610400, 373808163488684049, 19811832664899731265, 1168898127229083969892
Offset: 0

Views

Author

Mats Granvik, Mar 16 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Table[-1 + Sum[MoebiusMu[k]*Floor[#/(k^2)], {k, Floor[Sqrt[#]]}] &[Product[Prime[i], {i, n}]], {n, 0, 12}] (* Michael De Vlieger, Jan 24 2025 *)
  • PARI
    a(n) = my(t=vecprod(primes(n))-1); sum(i=1, sqrtint(t), t\i^2*moebius(i)); \\ Jinyuan Wang, Jan 24 2025
    
  • Python
    from math import isqrt
    from sympy import primorial, mobius
    def A158341(n):
        if n == 0: return 0
        m = primorial(n)-1
        return sum(mobius(k)*(m//k**2) for k in range(1,isqrt(m)+1)) # Chai Wah Wu, Jan 25 2025

Formula

a(n) = -1 + Sum_{i=1..floor(sqrt(A002110(n)))} moebius(i)*floor(A002110(n)/i^2). - Jinyuan Wang, Jan 24 2025

Extensions

Extended and offset corrected by Max Alekseyev, Sep 13 2009
a(15) from Michael De Vlieger, Jan 24 2025
a(16)-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.

A381391 Number of k <= 10^n that are neither squarefree nor prime powers (i.e., k is in A126706).

Original entry on oeis.org

0, 29, 367, 3866, 39098, 391838, 3920154, 39205902, 392069187, 3920718974, 39207261564, 392072817656, 3920728751139, 39207289143932, 392072896183208, 3920728975677128, 39207289797472001, 392072898095046811, 3920728981307675534, 39207289814141997459, 392072898144605471040
Offset: 1

Views

Author

Michael De Vlieger, Feb 22 2025

Keywords

Examples

			Let S = A126706.
a(1) = 0 since the smallest term in S is 12.
a(2) = 29 since S(1..29) = {12, 18, 20, 24, ..., 99, 100}, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[10^n - Sum[PrimePi@ Floor[10^(n/k)], {k, 2, Floor[Log2[10^n]]}] - Sum[MoebiusMu[k]*Floor[10^n/(k^2)], {k, Floor[Sqrt[10^n]]}], {n, 10}]
  • Python
    from math import isqrt
    from sympy import primepi, integer_nthroot, mobius
    def A381391(n):
        m = 10**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, Feb 23 2025

Formula

a(n) = 10^n - Sum_{k = 2..log_2(10^n)} pi(floor(10^(n/k))) - Sum_{k = 1..floor(sqrt(10^n))} mu(k)*floor(10^n/k^2), where pi = A000720 and mu = A008683.
a(n) = A011557(n) - A071172(n) - A267574(n).
Showing 1-3 of 3 results.