OFFSET
1,2
COMMENTS
First mentioned by Eric Angelini in the 'math-fun' mailing list on Jan 12, 2020.
The sequence is infinite because, when all smaller numbers fail, a sufficiently large 10^k+1 will always succeed.
LINKS
Hans Havermann, Table of n, a(n) for n = 1..461
Hans Havermann, Sequence graph using alternately-colored indices
EXAMPLE
a(4) = 11 because the smallest not-yet-used palindromes (4, 5, 6, 7, 8, 9) multiplied by 3 are not base-10 palindromes, but 11*3 is.
PROG
(Python)
from itertools import count, islice, product
def ispal(n): s = str(n); return s == s[::-1]
def pals(): # generator of palindromes
digits = "0123456789"
for d in count(1):
for p in product(digits, repeat=d//2):
if d > 1 and p[0] == "0": continue
left = "".join(p); right = left[::-1]
for mid in [[""], digits][d%2]: yield int(left + mid + right)
def agen(): # generator of terms
an, aset = 1, {0, 1} # 0 is not allowed
yield 1
while True:
for p in pals():
if p not in aset and ispal(an*p):
an = p; aset.add(an); yield an; break
print(list(islice(agen(), 51))) # Michael S. Branicky, Apr 29 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Hans Havermann, Feb 18 2020
STATUS
approved