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.

A085126 Multiples of 3 which are members of A002473. Or multiples of 3 with the largest prime divisor < 10.

Original entry on oeis.org

3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 36, 42, 45, 48, 54, 60, 63, 72, 75, 81, 84, 90, 96, 105, 108, 120, 126, 135, 144, 147, 150, 162, 168, 180, 189, 192, 210, 216, 225, 240, 243, 252, 270, 288, 294, 300, 315, 324, 336, 360, 375, 378, 384, 405, 420, 432, 441, 450
Offset: 1

Views

Author

Amarnath Murthy, Jul 06 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Select[3*Range[200],FactorInteger[#][[-1,1]]<10&] (* Harvey P. Dale, Apr 10 2019 *)
  • Python
    from sympy import integer_log
    def A085126(n):
        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
        def f(x):
            c = n+x
            for i in range(integer_log(x,7)[0]+1):
                for j in range(integer_log(m:=x//7**i,5)[0]+1):
                    for k in range(integer_log(r:=m//5**j,3)[0]+1):
                        c -= (r//3**k).bit_length()
            return c
        return bisection(f,n,n)*3 # Chai Wah Wu, Sep 17 2024
    
  • Python
    # faster for initial segment of sequence
    import heapq
    from itertools import islice
    def A085126gen(): # generator of terms
        v, oldv, h, psmooth_primes, = 1, 0, [1], [2, 3, 5, 7]
        while True:
            v = heapq.heappop(h)
            if v != oldv:
                yield 3*v
                oldv = v
                for p in psmooth_primes:
                        heapq.heappush(h, v*p)
    print(list(islice(A085126gen(), 65))) # Michael S. Branicky, Sep 17 2024

Formula

a(n) = 3*A002473(n). - Chai Wah Wu, Sep 18 2024
Sum_{n>=1} 1/a(n) = 35/24. - Amiram Eldar, Sep 23 2024

Extensions

More terms from David Wasserman, Jan 28 2005
Offset changed to 1 by Michael S. Branicky, Sep 17 2024