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.

A085133 Numbers k such that k and its digit reversal are both 7-smooth (A002473).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42, 45, 48, 50, 54, 60, 63, 70, 72, 80, 81, 84, 90, 100, 120, 144, 180, 200, 210, 240, 252, 270, 288, 300, 343, 360, 400, 405, 420, 441, 450, 480, 500, 504, 525, 540, 576, 600, 630, 675, 686, 700, 720
Offset: 1

Views

Author

Amarnath Murthy, Jul 06 2003

Keywords

Comments

Though a large number of initial terms match, it is different from A005349.
From Robert Israel, Mar 18 2018: (Start)
If n is a term, then so are 10^k*n for all k.
Is a(147)=84672 the last term not divisible by 10? If so, then a(n+43)=10*a(n) for n >= 105. (End)
All terms a(147..10000) are divisible by 10; a(10000) has 235 decimal digits. - Michael S. Branicky, Sep 21 2024

Crossrefs

Programs

  • Maple
    N:= 10^3: # to get all terms <= N (which should be a power of 10)
    revdigs:= proc(n) local L;
      L:= convert(n,base,10);
      add(10^(i-1)*L[-i],i=1..nops(L))
    end proc:
    S:= {seq(seq(seq(seq(2^a*3^b*5^c*7^d, d=0..floor(log[7](N/(2^a*3^b*5^c)))),c=0..floor(log[5](N/(2^a*3^b)))), b=0..floor(log[3](N/2^a))), a=0..floor(log[2](N)))}:
    S:= S intersect map(revdigs, S):
    S:= map(t -> seq(t*10^i, i=0..ilog10(N/t)), S):
    sort(convert(S,list)); # Robert Israel, Mar 18 2018
  • Python
    import heapq
    from itertools import islice
    from sympy import factorint
    def is7smooth(n):
        for p in [2, 3, 5, 7]:
            while n%p == 0: n //= p
        return n == 1
    def agen(): # generator of terms
        v, oldv, h = 1, 0, [1]
        while True:
            v = heapq.heappop(h)
            if v != oldv:
                if is7smooth(int(str(v)[::-1])):
                    yield v
                oldv = v
                for p in [2, 3, 5, 7]:
                    heapq.heappush(h, v*p)
    print(list(islice(agen(), 65))) # Michael S. Branicky, Sep 20 2024

Extensions

More terms from David Wasserman, Jan 28 2005