OFFSET
0,7
LINKS
EXAMPLE
a(6) = 7 because we have [216], [125, 64, 27], [125, 27, 64], [64, 125, 27], [64, 27, 125], [27, 125, 64] and [27, 64, 125].
MAPLE
b:= proc(n, i, p) option remember;
`if`((i*(i+1)/2)^2<n, 0, `if`(n=0, p!,
`if`(i^3>n, 0, b(n-i^3, i-1, p+1))+b(n, i-1, p)))
end:
a:= n-> b(n^3, n, 0):
seq(a(n), n=0..33); # Alois P. Heinz, Jan 31 2020
MATHEMATICA
b[n_, i_, p_] := b[n, i, p] = If[(i(i+1)/2)^2 < n, 0, If[n == 0, p!, If[i^3 > n, 0, b[n - i^3, i - 1, p + 1]] + b[n, i - 1, p]]];
a[n_] := b[n^3, n, 0];
a /@ Range[0, 33] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jan 31 2020
STATUS
approved