OFFSET
0,10
LINKS
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