login
A348524
Number of compositions (ordered partitions) of n into two or more cubes.
2
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, 150, 187, 232, 286, 351, 430, 527, 649, 802, 993, 1230, 1522, 1880, 2318, 2854, 3514, 4330, 5341, 6594, 8145, 10061, 12423, 15330, 18908, 23316, 28753, 35467, 43762
OFFSET
0,10
MAPLE
g:= proc(n) option remember;
local i, m, t;
m:= surd(n, 3);
if m::integer then t:= 1; m:= m-1 else t:= 0; m:= floor(m) fi;
t + add(procname(n-i^3), i=1..m)
end proc:
f:= proc(n) local m;
m:= surd(n, 3);
if m::integer then g(n)-1 else g(n) fi
end proc:
f(0):= 0:
map(f, [$0..100]);
MATHEMATICA
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}]];
f[n_] := Module[{m}, m = n^(1/3); If[IntegerQ[m], g[n]-1, g[n]]];
f[0] = 0;
Map[f, Range[0, 100]] (* Jean-François Alcover, Sep 19 2022, after Robert Israel *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Oct 21 2021
STATUS
approved