OFFSET
1,2
EXAMPLE
[a(1), a(2)] + a(3) = [1, 2] + 10 = 12 + 10 = 22 (palindrome);
[a(2), a(3)] + a(4) = [2, 10] + 12 = 210 + 12 = 222 (palindrome);
[a(3), a(4)] + a(5) = [10, 12] + 99 = 1012 + 99 = 1111 (palindrome);
[a(4), a(5)] + a(6) = [12, 99] + 32 = 1299 + 32 = 1331 (palindrome); etc.
PROG
(Python)
def ispal(n): s = str(n); return s == s[::-1]
def aupton(terms):
alst, seen = [1, 2], {1, 2}
for n in range(2, terms):
an, partial_sum = 1, int(str(alst[-2]) + str(alst[-1]))
while an in seen or not ispal(partial_sum + an): an += 1
alst.append(an); seen.add(an)
return alst
print(aupton(66)) # Michael S. Branicky, Aug 28 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Aug 28 2021
STATUS
approved