A126111 Number of subsets of {1,2,3,...,n} whose sum is a cube.
2, 2, 2, 3, 5, 6, 8, 15, 29, 48, 71, 112, 216, 445, 849, 1459, 2403, 4239, 8343, 17049, 33416, 61192, 107290, 190803, 361136, 722568, 1457638, 2847209, 5322619, 9679593, 17715193, 33626815, 66430582, 133432610, 264832126, 511136916, 960634698, 1786150886
Offset: 1
Keywords
Examples
There are five subsets of {1,2,3,4,5} that sum to a cube: {}, {1},{3,5}, {1,2,5} and {1,3,4}. Thus a(5)=5.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..300
Programs
-
Mathematica
g[n_] := Block[{p = Product[1 + z^i, {i, n}]},Sum[Boole[IntegerQ[k^(1/3)]]*Coefficient[p, z, k], {k, 0, n*(n + 1)/2}]];Array[g, 37] (* Ray Chandler, Mar 07 2007 *)
Extensions
Extended by Ray Chandler, Mar 07 2007
More terms from Alois P. Heinz, Jan 18 2014