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.

A179698 Numbers of the form p^4*q^3*r where p, q, and r are distinct primes.

Original entry on oeis.org

2160, 3024, 3240, 4536, 4752, 5616, 6000, 7128, 7344, 8208, 8424, 9936, 11016, 12312, 12528, 13392, 14000, 14904, 15000, 15984, 16464, 17712, 18576, 18792, 20088, 20250, 20304, 22000, 22896, 23976, 25488, 26000, 26352, 26568, 27440
Offset: 1

Views

Author

Keywords

Programs

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