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).

This page as a plain text file.
%I A085133 #27 Sep 22 2024 02:06:17
%S A085133 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,
%T A085133 70,72,80,81,84,90,100,120,144,180,200,210,240,252,270,288,300,343,
%U A085133 360,400,405,420,441,450,480,500,504,525,540,576,600,630,675,686,700,720
%N A085133 Numbers k such that k and its digit reversal are both 7-smooth (A002473).
%C A085133 Though a large number of initial terms match, it is different from A005349.
%C A085133 From _Robert Israel_, Mar 18 2018: (Start)
%C A085133 If n is a term, then so are 10^k*n for all k.
%C A085133 Is a(147)=84672 the last term not divisible by 10?  If so, then a(n+43)=10*a(n) for n >= 105. (End)
%C A085133 All terms a(147..10000) are divisible by 10; a(10000) has 235 decimal digits. - _Michael S. Branicky_, Sep 21 2024
%H A085133 Michael S. Branicky, <a href="/A085133/b085133.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1225 from Robert Israel)
%p A085133 N:= 10^3: # to get all terms <= N (which should be a power of 10)
%p A085133 revdigs:= proc(n) local L;
%p A085133   L:= convert(n,base,10);
%p A085133   add(10^(i-1)*L[-i],i=1..nops(L))
%p A085133 end proc:
%p A085133 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)))}:
%p A085133 S:= S intersect map(revdigs, S):
%p A085133 S:= map(t -> seq(t*10^i, i=0..ilog10(N/t)), S):
%p A085133 sort(convert(S,list)); # _Robert Israel_, Mar 18 2018
%o A085133 (Python)
%o A085133 import heapq
%o A085133 from itertools import islice
%o A085133 from sympy import factorint
%o A085133 def is7smooth(n):
%o A085133     for p in [2, 3, 5, 7]:
%o A085133         while n%p == 0: n //= p
%o A085133     return n == 1
%o A085133 def agen(): # generator of terms
%o A085133     v, oldv, h = 1, 0, [1]
%o A085133     while True:
%o A085133         v = heapq.heappop(h)
%o A085133         if v != oldv:
%o A085133             if is7smooth(int(str(v)[::-1])):
%o A085133                 yield v
%o A085133             oldv = v
%o A085133             for p in [2, 3, 5, 7]:
%o A085133                 heapq.heappush(h, v*p)
%o A085133 print(list(islice(agen(), 65))) # _Michael S. Branicky_, Sep 20 2024
%Y A085133 Cf. A005349, A002473.
%K A085133 base,nonn
%O A085133 1,2
%A A085133 _Amarnath Murthy_, Jul 06 2003
%E A085133 More terms from _David Wasserman_, Jan 28 2005