login
A339615
Number of nonempty sets of distinct positive integers whose sum of cubes is a cube, the largest integer of a set is n.
0
1, 1, 1, 1, 2, 1, 1, 3, 1, 6, 5, 9, 10, 25, 32, 51, 97, 144, 244, 463, 767, 1062, 2005, 4177, 5716, 12101, 21526, 35306, 64629, 114871, 205337, 372317, 718410, 1226320, 2361112, 4308192, 7301384, 14615750, 26382095, 47631200, 91388286, 171931627, 302867194, 578843590, 1112232587
OFFSET
1,5
EXAMPLE
a(13) = 10 sets: {13}, {2, 3, 8, 13}, {4, 8, 11, 12, 13}, {1, 2, 6, 7, 11, 13}, {2, 5, 7, 8, 12, 13}, {3, 4, 8, 10, 11, 12, 13}, {1, 2, 3, 4, 5, 7, 11, 13}, {2, 3, 4, 6, 7, 8, 9, 13}, {1, 2, 5, 6, 7, 8, 9, 10, 12, 13} and {2, 3, 5, 7, 8, 9, 10, 11, 12, 13}.
PROG
(Python)
from functools import lru_cache
def perf_cube(n): return round(n**(1/3))**3 ==n
@lru_cache(maxsize=None)
def b(n, soc, c):
if n == 0:
if perf_cube(soc): return 1
return 0
return b(n-1, soc, c) + b(n-1, soc+n*n*n, c+1)
a = lambda n: b(n-1, n*n*n, 1)
print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Dec 10 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 10 2020
EXTENSIONS
a(24)-a(41) from Michael S. Branicky, Dec 10 2020
a(42)-a(45) from Alois P. Heinz, Dec 11 2020
STATUS
approved