close
login
A391057
Lexicographically earliest infinite sequence of distinct positive numbers such that, for n > 2, a(n) shares a factor with R(a(n-1)), where R(k) is the digital reversal of k.
5
1, 2, 4, 6, 3, 9, 12, 7, 14, 41, 8, 16, 61, 18, 15, 17, 71, 34, 43, 20, 22, 11, 33, 21, 24, 26, 28, 30, 27, 32, 23, 36, 35, 53, 5, 25, 13, 31, 39, 42, 38, 83, 19, 49, 40, 44, 46, 48, 45, 50, 55, 60, 51, 54, 57, 63, 52, 65, 56, 70, 77, 66, 58, 68, 62, 64, 69, 72, 75
OFFSET
1,2
COMMENTS
As the sequence is infinite no term, except a(1), can be a power of 10.
The fixed points are 1, 2, 15, 20, 26, 39, 48, 50, 54, 120, 141, ... . It is likely there are infinitely many.
LINKS
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^16, showing primes in red, proper prime powers in gold, squarefree composites in green, powerful numbers that are not prime powers in purple, and numbers that are neither squarefree nor powerful in blue.
EXAMPLE
a(8) = 7 as a(7) = 12 and R(12) = 21, and 7 is the smallest unused number that shares a factor with 21.
MATHEMATICA
Block[{c, i, j, k, m, d, nn, u}, nn = 120; c[_] := False; m[_] := 1; j = d = 1; u = 2; Array[Set[c[10^#], True] &, 21, 0]; {1}~Join~Reap[Do[If[PrimePowerQ[d], d = FactorInteger[d][[1, 1]]; While[c[Set[k, m[d]*d]], m[d]++], k = u; While[Or[c[k], CoprimeQ[k, d]], k++]]; Sow[k]; Set[{c[k], j, d}, {True, k, IntegerReverse[k]}]; If[k == u, While[c[u], u++]], {n, 2, nn}] ][[-1, 1]] ] (* Michael De Vlieger, Feb 03 2026 *)
PROG
(Python)
from math import gcd
from itertools import count, islice
def is_pow10(k): return str(k).strip("0") == "1"
def agen(): # generator of terms
yield from [1, 2]
aset, an, m = {1, 2}, 2, 3
while True:
R = int(str(an)[::-1])
an = next(k for k in count(m) if k not in aset and gcd(k, R) > 1 and not is_pow10(k))
yield an
aset.add(an)
while m in aset or is_pow10(m): m += 1
print(list(islice(agen(), 69))) # Michael S. Branicky, Feb 03 2026
CROSSREFS
KEYWORD
nonn,base,look
AUTHOR
Scott R. Shannon, Jan 31 2026
STATUS
approved