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

A380337 Number of perfect powers (in A001597) that do not exceed primorial A002110(n).

Original entry on oeis.org

1, 1, 2, 7, 19, 63, 208, 802, 3344, 15576, 82368, 453834, 2743903, 17510668, 114616907, 785002449, 5711892439, 43861741799, 342522899289, 2803468693325, 23621594605383, 201819398349092, 1793794228847381, 16342173067958793, 154171432351500060, 1518411003599957803
Offset: 0

Views

Author

Michael De Vlieger, Jan 21 2025

Keywords

Comments

In other words, A001597(a(n)) is the largest perfect power less than or equal to A002110(n).

Examples

			Let P = A002110 and let s = A001597.
a(0) = 1 since P(0) = 1, and the set s(1) = {1} contains k that do not exceed 1.
a(1) = 1 since P(1) = 2, and the set s(1) = {1} contains k <= 2.
a(2) = 2 since P(2) = 6, and the set s(1..2) = {1, 4} contains k <= 6.
a(3) = 7 since P(3) = 30, and the set s(1..7) = {1, 4, 8, 9, 16, 25, 27} contains k <= 30.
a(4) = 19 since P(4) = 210, and the set s(1..19) = {1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196} contains k <= 210, etc.
		

Crossrefs

Programs

  • Mathematica
    Map[1 - Sum[MoebiusMu[k]*Floor[#^(1/k) - 1], {k, 2, Floor[Log2[#]]}] &, FoldList[Times, 1, Prime[Range[30]]] ]
  • Python
    from sympy import primorial, mobius, integer_nthroot
    def A380337(n):
        if n == 0: return 1
        p = primorial(n)
        return int(1-sum(mobius(k)*(integer_nthroot(p,k)[0]-1) for k in range(2,p.bit_length()))) # Chai Wah Wu, Jan 23 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.
Showing 1-2 of 2 results.