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.
%I A377122 #7 Nov 01 2024 21:31:14 %S A377122 1,3,7,14,23,31,40,54,78,125,219,416,865,1719,3375,6646,13139,26103, %T A377122 52029,103989,207805,415509,828997,1629345,3084165,5525120,9319815, %U A377122 14896533,22847075,34326110,51747646,80304059,130836329,225170322,406349931,759326388,1453773251 %N A377122 Number of subsets of the first n nonzero decimal palindromes whose sum is a nonzero decimal palindrome. %e A377122 a(5) = 23 subsets: {1}, {2}, {3}, {4}, {5}, {1, 2}, {1, 3}, {1, 4}, {1, 5}, {2, 3}, {2, 4}, {2, 5}, {3, 4}, {3, 5}, {4, 5}, {1, 2, 3}, {1, 2, 4}, {1, 2, 5}, {1, 3, 4}, {1, 3, 5}, {2, 3, 4}, {2, 4, 5} and {1, 2, 3, 5}. %o A377122 (Python) %o A377122 from functools import cache %o A377122 def cond(s): return s > 0 and (w:=str(s)) == w[::-1] %o A377122 def u(n): return A002113(n+1) # uses function in A002113 %o A377122 @cache %o A377122 def b(n, s): %o A377122 if n == 0: return int(cond(s)) %o A377122 return b(n-1, s) + b(n-1, s+u(n)) %o A377122 a = lambda n: b(n, 0) %o A377122 print([a(n) for n in range(1, 51)]) # _Michael S. Branicky_, Oct 18 2024 %Y A377122 Cf. A002113, A339507. %K A377122 nonn,base %O A377122 1,2 %A A377122 _Ilya Gutkovskiy_, Oct 17 2024 %E A377122 a(23) and beyond from _Michael S. Branicky_, Oct 18 2024