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.

A380431 Number of powerful numbers that are not powers of primes (i.e. are in A286708) that do not exceed 2^n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 4, 9, 17, 28, 48, 75, 115, 178, 266, 403, 590, 865, 1263, 1830, 2644, 3810, 5466, 7838, 11210, 16011, 22841, 32530, 46315, 65886, 93658, 133060, 188952, 268204, 380564, 539823, 765481, 1085224, 1538194, 2179816, 3088481, 4375308, 6197420, 8777222
Offset: 0

Views

Author

Michael De Vlieger, Jan 24 2025

Keywords

Examples

			Let s = A286708 = A001694 \ A246547 \ {1}.
a(0..5) = 0 since the smallest number in s is 36.
a(6) = 1 since only s(1) = 36 is smaller than 2^6 = 64.
a(7) = 4 since s(1..4) = {36, 72, 100, 108} are smaller than 2^7 = 128.
a(8) = 9 since s(1..9) = {36, 72, 100, 108, 144, 196, 200, 216, 225} are smaller than 2^8 = 256, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[-1 + Sum[If[MoebiusMu[j] != 0, Floor[Sqrt[(2^n)/j^3]], 0], {j, 2^(n/3)}] - Sum[PrimePi@ Floor[2^(n/k)], {k, 2, n}], {n, 0, 45} ]
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot, primepi
    def A380431(n):
        def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
        l, m = 0, 1<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, Jan 30 2025

Formula

a(n) = A062762(n) - A036386(n) - 1.
a(n) <= A372403(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-2 of 2 results.