OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..103
EXAMPLE
a(8) = 13 subsets: {1}, {4}, {10}, {20}, {35}, {56}, {84}, {120}, {1, 20, 35}, {1, 35, 84}, {10, 35, 120}, {1, 4, 10, 20} and {1, 4, 20, 56, 84}.
PROG
(Python)
from sympy import integer_nthroot
def is_tetra(n): return (c:=integer_nthroot(6*n, 3)[0])*(c+1)*(c+2) == 6*n
from functools import cache
@cache
def b(n, s):
if n == 0:
if s > 0 and is_tetra(s): return 1
return 0
return b(n-1, s) + b(n-1, s+n*(n+1)*(n+2)//6)
a = lambda n: b(n, 0)
print([a(n) for n in range(1, 30)]) # Michael S. Branicky, Nov 18 2024
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Ilya Gutkovskiy, Nov 18 2024
EXTENSIONS
a(24) and beyond from Michael S. Branicky, Nov 18 2024
STATUS
approved