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.

A228056 Numbers of the form p * m^2, where p is prime and m > 1.

Original entry on oeis.org

8, 12, 18, 20, 27, 28, 32, 44, 45, 48, 50, 52, 63, 68, 72, 75, 76, 80, 92, 98, 99, 108, 112, 116, 117, 124, 125, 128, 147, 148, 153, 162, 164, 171, 172, 175, 176, 180, 188, 192, 200, 207, 208, 212, 236, 242, 243, 244, 245, 252, 261, 268, 272, 275, 279, 284
Offset: 1

Views

Author

T. D. Noe, Aug 13 2013

Keywords

Comments

This sequence is the first step toward candidates for odd perfect numbers, A228058.

Crossrefs

Programs

  • Haskell
    import Data.List (partition)
    a228056 n = a228056_list !! (n-1)
    a228056_list = filter f [1..] where
       f x = length us == 1 && (head us > 1 || not (null vs)) where
             (us,vs) = partition odd $ a124010_row x
    -- Reinhard Zumkeller, Aug 14 2013
    
  • Mathematica
    nn = 300; Union[Select[Flatten[Table[p*n^2, {p, Prime[Range[PrimePi[nn/4]]]}, {n, 2, Sqrt[nn/2]}]], # < nn &]]
  • PARI
    list(lim)=my(v=List()); forfactored(n=2, lim\1, my(e=n[2][, 2]); if(vecsum(e%2)==1 && e!=[1]~, listput(v, n[1]))); Vec(v); \\ Charles R Greathouse IV, Oct 01 2021
    
  • Python
    from math import isqrt
    from sympy import primepi
    def A228056(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 f(x): return n+x-sum(primepi(x//y**2) for y in range(2,isqrt(x)+1))
        return bisection(f,n,n) # Chai Wah Wu, Jun 06 2025

Formula

Bhat proves there are ~ (Pi^2/6-1)*x/log x members of this sequence up to x, so a(n) ~ kn log n with k = 6/(Pi^2-6) = 1.550546.... - Charles R Greathouse IV, Oct 01 2021