OFFSET
1,3
EXAMPLE
a(1) + a(2) + a(3) = 0 + 1 + 2 = 3 (palindrome);
a(2) + a(3) + a(4) = 1 + 2 + 3 = 6 (palindrome);
a(3) + a(4) + a(5) = 2 + 3 + 4 = 9 (palindrome);
a(4) + a(5) + a(6) = 3 + 4 + 15 = 22 (palindrome); etc.
PROG
(Python)
def ispal(n): s = str(n); return s == s[::-1]
def aupton(terms):
alst, seen = [0, 1], {0, 1}
for n in range(2, terms):
an, partial_sum = 1, sum(alst[-2:])
while an in seen or not ispal(partial_sum + an): an += 1
alst.append(an); seen.add(an)
return alst
print(aupton(201)) # Michael S. Branicky, Aug 28 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Aug 28 2021
STATUS
approved