%I #10 Nov 26 2020 11:07:59
%S 1,1,1,1,1,1,7,1,1,127,1,1,127,769,10945,15961,86641,86521,430717,
%T 4140367,4146751,93669001,1538834041,663998665,6883029151,1014140647,
%U 20591858857,121532206567,1637261351983,2981530899847,5950338797191,47072230385425
%N Number of compositions (ordered partitions) of n^3 into distinct cubes.
%H Alois P. Heinz, <a href="/A331899/b331899.txt">Table of n, a(n) for n = 0..100</a>
%H <a href="/index/Com#comp">Index entries for sequences related to compositions</a>
%H <a href="/index/Su#ssq">Index entries for sequences related to sums of cubes</a>
%F a(n) = A331845(A000578(n)).
%e 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].
%p b:= proc(n, i, p) option remember;
%p `if`((i*(i+1)/2)^2<n, 0, `if`(n=0, p!,
%p `if`(i^3>n, 0, b(n-i^3, i-1, p+1))+b(n, i-1, p)))
%p end:
%p a:= n-> b(n^3, n, 0):
%p seq(a(n), n=0..33); # _Alois P. Heinz_, Jan 31 2020
%t 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]]];
%t a[n_] := b[n^3, n, 0];
%t a /@ Range[0, 33] (* _Jean-François Alcover_, Nov 26 2020, after _Alois P. Heinz_ *)
%Y Cf. A000578, A030272, A259792, A290247, A298641, A298672, A298848, A331845, A331884.
%K nonn
%O 0,7
%A _Ilya Gutkovskiy_, Jan 31 2020