OFFSET
1,2
EXAMPLE
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}.
PROG
(Python)
from functools import cache
def cond(s): return s > 0 and (w:=str(s)) == w[::-1]
@cache
def b(n, s):
if n == 0: return int(cond(s))
return b(n-1, s) + b(n-1, s+u(n))
a = lambda n: b(n, 0)
print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Oct 18 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Oct 17 2024
EXTENSIONS
a(23) and beyond from Michael S. Branicky, Oct 18 2024
STATUS
approved