A378171 Number of subsets of the first n positive cubes whose sum is a positive cube.
1, 2, 3, 4, 6, 7, 8, 11, 12, 18, 23, 32, 42, 67, 99, 150, 247, 391, 635, 1098, 1865, 2927, 4932, 9109, 14825, 26926, 48452, 83758, 148387, 263258, 468595, 840912, 1559322, 2785642, 5146754, 9454946, 16756330, 31372080, 57754175, 105385375, 196773661, 368705288, 671572482
Offset: 1
Keywords
Examples
a(8) = 11 subsets: {1}, {8}, {27}, {64}, {125}, {216}, {343}, {512}, {1, 216, 512}, {27, 64, 125} and {1, 27, 64, 125, 512}.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..74
Programs
-
Python
from sympy import integer_nthroot def is_cube(n): return integer_nthroot(n, 3)[1] from functools import cache @cache def b(n, soc): if n == 0: if soc > 0 and is_cube(soc): return 1 return 0 return b(n-1, soc) + b(n-1, soc+n**3) a = lambda n: b(n, 0) print([a(n) for n in range(1, 30)]) # Michael S. Branicky, Nov 18 2024
Extensions
a(25) and beyond from Michael S. Branicky, Nov 18 2024