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.

A189987 Numbers with prime factorization p*q^6.

Original entry on oeis.org

192, 320, 448, 704, 832, 1088, 1216, 1458, 1472, 1856, 1984, 2368, 2624, 2752, 3008, 3392, 3645, 3776, 3904, 4288, 4544, 4672, 5056, 5103, 5312, 5696, 6208, 6464, 6592, 6848, 6976, 7232, 8019, 8128, 8384, 8768, 8896, 9477, 9536, 9664, 10048, 10432, 10688
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_]:=Sort[Last/@FactorInteger[n]]=={1,6}; Select[Range[30000],f]
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2, (lim\2)^(1/6), t=p^6;forprime(q=2, lim\t, if(p==q, next);listput(v,t*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 20 2011
    
  • Python
    from sympy import primepi, primerange, integer_nthroot
    def A189987(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//p**6) for p in primerange(integer_nthroot(x,6)[0]+1))+primepi(integer_nthroot(x,7)[0])
        return bisection(f,n,n) # Chai Wah Wu, Feb 22 2025