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.

A096917 Smallest prime factor of the n-th product of 3 distinct primes.

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 2, 3, 2, 3, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 2, 5, 3, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 5, 3, 2, 2, 3, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 5, 2, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 5, 2, 2, 2, 3, 2, 5, 2, 3, 2, 2, 3, 2, 3, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 15 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_]:=Last/@FactorInteger[n]=={1,1,1};f1[n_]:=Min[First/@FactorInteger[n]];f2[n_]:=Max[First/@FactorInteger[n]];lst={};Do[If[f[n],AppendTo[lst,f1[n]]],{n,0,7!}];lst (* Vladimir Joseph Stephan Orlovsky, Apr 10 2010 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot, primefactors
    def A096917(n):
        def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1),1) for b,m in enumerate(primerange(k+1,isqrt(x//k)+1),a+1)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return min(primefactors(bisection(f))) # Chai Wah Wu, Aug 30 2024

Formula

a(n)*A096918(n)*A096919(n) = A007304(n).
a(n) < A096918(n) < A096919(n).
a(n) = A020639(A007304(n)).