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
Scott R. Shannon, Table of n, a(n) for n = 1..10000
Scott R. Shannon, Image of the first 1000000 terms.
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
AUTHOR
Scott R. Shannon, Jan 31 2026
STATUS
approved
