OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1) = 0: [0,0,0,0,0,0,0,0,0].
a(2) = 8: [0,0,0,0,0,0,0,0,2], [0,1,1,1,1,1,1,1,1].
a(3) = 35: [0,0,0,0,0,0,0,2,3], [0,0,1,1,1,2,2,2,2], [1,1,1,1,1,1,1,1,3].
a(7) = 216: [0,0,0,0,0,0,0,0,6], [0,1,1,1,2,2,2,4,5], [0,0,1,1,2,3,3,3,5], [1,2,2,3,3,3,3,3,4], [0,0,0,2,2,2,4,4,4], [0,3,3,3,3,3,3,3,3], [0,0,0,0,0,0,3,4,5].
MAPLE
b:= proc(n, i, t) option remember;
`if`(n=0, 1, `if`(i<1 or t<1, 0, b(n, i-1, t)+
`if`(i^3>n, 0, b(n-i^3, i, t-1))))
end:
a:= proc(n) local k;
for k from 0 while b(k, isqrt(k), 9)<>n do od; k
end:
seq(a(n), n=1..20); # Alois P. Heinz, Jul 26 2012
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i < 1 || t < 1, 0, b[n, i - 1, t] + If[i^3 > n, 0, b[n - i^3, i, t - 1]]]];
a[n_] := Module[{k}, For[k = 0, b[k, Floor@Sqrt[k], 9] != n, k++]; k];
Array[a, 20] (* Jean-François Alcover, Nov 21 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Claudio Meller, Jul 26 2012
EXTENSIONS
More terms from Alois P. Heinz, Jul 26 2012
STATUS
approved