OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
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^2>n, 0, b(n-i^2, i, t-1))))
end:
a:= n-> b(n, isqrt(n), 8):
seq(a(n), n=0..120); # Alois P. Heinz, May 30 2014
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^2 > n, 0, b[n-i^2, i, t-1]]]]; a[n_] := b[n, Sqrt[n] // Floor, 8]; Table[a[n], {n, 0, 120}] (* Jean-François Alcover, Jun 11 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved