login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #27 Sep 22 2024 02:06:17

%S 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 70,72,80,81,84,90,100,120,144,180,200,210,240,252,270,288,300,343,

%U 360,400,405,420,441,450,480,500,504,525,540,576,600,630,675,686,700,720

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

%C Though a large number of initial terms match, it is different from A005349.

%C From _Robert Israel_, Mar 18 2018: (Start)

%C If n is a term, then so are 10^k*n for all k.

%C 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 All terms a(147..10000) are divisible by 10; a(10000) has 235 decimal digits. - _Michael S. Branicky_, Sep 21 2024

%H 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 N:= 10^3: # to get all terms <= N (which should be a power of 10)

%p revdigs:= proc(n) local L;

%p L:= convert(n,base,10);

%p add(10^(i-1)*L[-i],i=1..nops(L))

%p end proc:

%p 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 S:= S intersect map(revdigs, S):

%p S:= map(t -> seq(t*10^i, i=0..ilog10(N/t)), S):

%p sort(convert(S,list)); # _Robert Israel_, Mar 18 2018

%o (Python)

%o import heapq

%o from itertools import islice

%o from sympy import factorint

%o def is7smooth(n):

%o for p in [2, 3, 5, 7]:

%o while n%p == 0: n //= p

%o return n == 1

%o def agen(): # generator of terms

%o v, oldv, h = 1, 0, [1]

%o while True:

%o v = heapq.heappop(h)

%o if v != oldv:

%o if is7smooth(int(str(v)[::-1])):

%o yield v

%o oldv = v

%o for p in [2, 3, 5, 7]:

%o heapq.heappush(h, v*p)

%o print(list(islice(agen(), 65))) # _Michael S. Branicky_, Sep 20 2024

%Y Cf. A005349, A002473.

%K base,nonn

%O 1,2

%A _Amarnath Murthy_, Jul 06 2003

%E More terms from _David Wasserman_, Jan 28 2005