login
Number of compositions (ordered partitions) of n into two or more cubes.
2

%I #13 Sep 19 2022 04:53:18

%S 0,0,1,1,1,1,1,1,1,3,4,5,6,7,8,9,11,14,18,23,29,36,44,53,64,78,96,119,

%T 150,187,232,286,351,430,527,649,802,993,1230,1522,1880,2318,2854,

%U 3514,4330,5341,6594,8145,10061,12423,15330,18908,23316,28753,35467,43762

%N Number of compositions (ordered partitions) of n into two or more cubes.

%H Robert Israel, <a href="/A348524/b348524.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Su#ssq">Index entries for sequences related to sums of cubes</a>

%p g:= proc(n) option remember;

%p local i,m,t;

%p m:= surd(n,3);

%p if m::integer then t:= 1; m:= m-1 else t:= 0; m:= floor(m) fi;

%p t + add(procname(n-i^3),i=1..m)

%p end proc:

%p f:= proc(n) local m;

%p m:= surd(n,3);

%p if m::integer then g(n)-1 else g(n) fi

%p end proc:

%p f(0):= 0:

%p map(f, [$0..100]);

%t g[n_] := g[n] = Module[{m, t}, m = n^(1/3); If[IntegerQ[m], t = 1; m = m - 1, t = 0; m = Floor[m]]; t + Sum[g[n - i^3], {i, 1, m}]];

%t f[n_] := Module[{m}, m = n^(1/3); If[IntegerQ[m], g[n]-1, g[n]]];

%t f[0] = 0;

%t Map[f, Range[0, 100]] (* _Jean-François Alcover_, Sep 19 2022, after _Robert Israel_ *)

%Y Cf. A000578, A010057, A023358, A347805, A348522.

%K nonn

%O 0,10

%A _Ilya Gutkovskiy_, Oct 21 2021