cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A347336 Lexicographically earliest sequence of distinct positive integers such that the concatenation of a(n) and a(n+1) added to a(n+2) is a palindrome in base 10.

This page as a plain text file.
%I A347336 #15 Aug 30 2021 21:47:54
%S A347336 1,2,10,12,99,32,67,66,120,46,75,209,48,64,20,26,86,196,72,19,8,4,15,
%T A347336 9,22,7,5,13,42,319,105,808,793,1115,282,829,553,375,1080,493,308,
%U A347336 1186,617,194,522,1069,156,445,206,338,264,569,993,82,17,11,60,61,55,71,94,33,16,127,34,87
%N A347336 Lexicographically earliest sequence of distinct positive integers such that the concatenation of a(n) and a(n+1) added to a(n+2) is a palindrome in base 10.
%e A347336 [a(1), a(2)] + a(3) = [1, 2] + 10 = 12 + 10 = 22 (palindrome);
%e A347336 [a(2), a(3)] + a(4) = [2, 10] + 12 = 210 + 12 = 222 (palindrome);
%e A347336 [a(3), a(4)] + a(5) = [10, 12] + 99 = 1012 + 99 = 1111 (palindrome);
%e A347336 [a(4), a(5)] + a(6) = [12, 99] + 32 = 1299 + 32 = 1331 (palindrome); etc.
%o A347336 (Python)
%o A347336 def ispal(n): s = str(n); return s == s[::-1]
%o A347336 def aupton(terms):
%o A347336     alst, seen = [1, 2], {1, 2}
%o A347336     for n in range(2, terms):
%o A347336         an, partial_sum = 1, int(str(alst[-2]) + str(alst[-1]))
%o A347336         while an in seen or not ispal(partial_sum + an): an += 1
%o A347336         alst.append(an); seen.add(an)
%o A347336     return alst
%o A347336 print(aupton(66)) # _Michael S. Branicky_, Aug 28 2021
%Y A347336 Cf. A002113, A082216, A347335.
%K A347336 base,nonn
%O A347336 1,2
%A A347336 _Eric Angelini_ and _Carole Dubois_, Aug 28 2021