OFFSET
0,1
COMMENTS
LINKS
MATHEMATICA
Select[Range[250], Boole[PalindromeQ/@Rest[NestList[#+IntegerReverse[#]&, #, 2]]] == {0, 1}&] (* Harvey P. Dale, May 11 2022 *)
PROG
(Python)
def ra(n): s = str(n); return int(s) + int(s[::-1])
def ispal(n): s = str(n); return s == s[::-1]
def aupto(limit):
alst = []
for k in range(limit+1):
k2 = ra(k)
if ispal(k2): continue
if ispal(ra(k2)): alst.append(k)
return alst
print(aupto(250)) # Michael S. Branicky, May 06 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved