OFFSET
1,2
COMMENTS
Obviously the sequence cannot contain 0.
It is easy to prove that the sequence is a permutation of the nonzero palindromes (in the sense that it contains each of them exactly once).
LINKS
Eric Angelini, Sums with palindromes, personal blog "Cinquante signes" on blogspot.com, and post to the math-fun list, Sep 12 2022
PROG
(PARI) A357044_first(n, U=[0], a=9)={vector(n, k, k=U[1]; while(is_A002113(a+k=A262038(k+1)) || setsearch(U, k), ); U=setunion(U, [a=k]); while(#U>1 && U[2]==A262038(U[1]+1), U=U[^1]); a)}
(Python)
from itertools import count, islice
def ispal(n): s = str(n); return s == s[::-1]
def nextpal(p): # next largest palindrome after palindrome p
d = str(p)
if set(d) == {'9'}: return int('1' + '0'*(len(d)-1) + '1')
h = str(int(d[:(len(d)+1)//2]) + 1)
return int(h + h[:-1][::-1]) if len(d)&1 else int(h + h[::-1])
def agen():
aset, pal, minpal = {1}, 1, 2
while True:
an = pal; yield an; aset.add(an); pal = minpal
while pal in aset or ispal(an+pal): pal = nextpal(pal)
while minpal in aset: minpal = nextpal(minpal)
print(list(islice(agen(), 55))) # Michael S. Branicky, Sep 14 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and M. F. Hasler, Sep 14 2022
STATUS
approved