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.

A179667 Products of the 5th power of a prime and 2 distinct primes (p^5*q*r).

Original entry on oeis.org

480, 672, 1056, 1120, 1248, 1632, 1760, 1824, 2080, 2208, 2430, 2464, 2720, 2784, 2912, 2976, 3040, 3402, 3552, 3680, 3808, 3936, 4128, 4256, 4512, 4576, 4640, 4960, 5088, 5152, 5346, 5664, 5856, 5920, 5984, 6318, 6432, 6496, 6560, 6688, 6816, 6880
Offset: 1

Views

Author

Keywords

Programs

  • Mathematica
    f[n_]:=Sort[Last/@FactorInteger[n]]=={1,1,5}; Select[Range[10000], f]
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2,(lim\6)^(1/5),forprime(q=2,sqrt(lim\p^5),if(p==q,next);t=p^5*q;forprime(r=q+1,lim\t,if(p==r,next);listput(v,t*r))));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 20 2011
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A179667(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((t:=primepi(s:=isqrt(y:=x//r**5)))+(t*(t-1)>>1)-sum(primepi(y//k) for k in primerange(1, s+1)) for r in primerange(integer_nthroot(x,5)[0]+1))+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, Mar 27 2025