login
The smallest positive number k such that the digit reversal of k, when it is written in all bases 2 to n, shares a factor with k.
7

%I #17 Feb 06 2026 11:07:39

%S 3,6,6,6,10,10,12,12,12,12,24,24,24,24,24,24,42,42,42,42,42,42,60,60,

%T 60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,60,84,84,84,84,84,84,84,

%U 84,84,84,84,84,108,108,108,108,108,108,120,120,120,120,120,120

%N The smallest positive number k such that the digit reversal of k, when it is written in all bases 2 to n, shares a factor with k.

%C It is unknown if the sequence is infinite.

%H Scott R. Shannon, <a href="/A393176/b393176.txt">Table of n, a(n) for n = 2..1427</a>

%F a(n+1) >= a(n). - _Michael S. Branicky_, Feb 06 2026

%e a(2) = 3 as 3 = 11_2 and the reverse of 11_2 = R(11_2) = 3 and 3 shares a factor with 3.

%e a(3) = 6 as 6 = 110_2 and R(110_2) = 11_2 = 3 and 3 shares a factor with 6, and 6 = 20_3 and R(20_3) = 2_3 = 2 and 2 shares a factor with 6.

%e a(6) = 10 as 10 = 1010_2 and R(1010_2) = 101_2 = 5, 10 = 101_3 and R(101_3) = 101_3 = 10, 10 = 22_4 and R(22_4) = 22_4 = 10, 10 = 20_5 and R(20_5) = 2_5 = 2, 10 = 14_6 and R(14_6) = 41_6 = 25, and 5, 10, 10, 2, 25 all share a factor with 10.

%o (Python)

%o from itertools import count

%o from math import gcd

%o from sympy.ntheory import digits

%o def fd(t, b): return sum(t[-1-i]*b**i for i in range(len(t)))

%o def dr(k, b): return fd(digits(k, b)[1:][::-1], b)

%o def a(n, startk=1): return next(k for k in count(startk) if all(gcd(dr(k, b), k) > 1 for b in range(2, n+1)))

%o print([a(n) for n in range(2, 66)]) # _Michael S. Branicky_, Feb 06 2026

%o (Python) # use with above for initial segment of sequence

%o from itertools import islice

%o def agen(): # generator of terms

%o an = 1

%o yield from (an for n in count(2) if (an:=a(n, startk = an)))

%o print(list(islice(agen(), 64))) # _Michael S. Branicky_, Feb 06 2026

%Y Cf. A030101, A030102, A030103, A030104, A071249, A393075, A391057.

%K nonn,base

%O 2,1

%A _Scott R. Shannon_, Feb 04 2026