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.

A082293 Numbers having exactly one square divisor > 1.

Original entry on oeis.org

4, 8, 9, 12, 18, 20, 24, 25, 27, 28, 40, 44, 45, 49, 50, 52, 54, 56, 60, 63, 68, 75, 76, 84, 88, 90, 92, 98, 99, 104, 116, 117, 120, 121, 124, 125, 126, 132, 135, 136, 140, 147, 148, 150, 152, 153, 156, 164, 168, 169, 171, 172, 175, 184, 188, 189, 198, 204, 207, 212
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 08 2003

Keywords

Comments

Numbers of the form m*p^2, p prime and m squarefree (A005117). [Corrected by Peter Munn, Nov 17 2020]
The asymptotic density of this sequence is (6/Pi^2)*Sum_{n>=1} 1/prime(n)^2 = 0.274933... (A222056). - Amiram Eldar, Jul 07 2020

Crossrefs

Complement of A048111 within A013929.
Subsequence of A252849.
Disjoint union of A048109 and A060687.
A285508 is a subsequence.

Programs

  • Mathematica
    Select[Range[2, 200], MemberQ[{2, 3}, (e = Sort[FactorInteger[#][[;; , 2]]])[[-1]]] && (Length[e] == 1 || e[[-2]] == 1) &] (* Amiram Eldar, Jul 07 2020 *)
  • PARI
    is(n)=my(f=vecsort(factor(n)[,2],,4)); #f && f[1]>1 && f[1]<4 && (#f==1 || f[2]==1) \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    from math import isqrt
    from sympy import mobius, primerange
    def A082293(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def g(x): return sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        def f(x): return int(n+x-sum(g(x//p**2) for p in primerange(isqrt(x)+1)))
        return bisection(f,n,n) # Chai Wah Wu, Feb 24 2025

Formula

A046951(a(n)) = 2.