OFFSET
1,6
LINKS
Robert Israel, Table of n, a(n) for n = 1..100
EXAMPLE
All solutions for n=5
..0
..0
..0
..0
..2
MAPLE
F:= proc(n, t) option remember;
local k, r;
if t < 0 or t > (n+1)^2*n^2 then return 0 fi;
if n = 1 then if member(t, [0, 1, 4]) then return 1 else return 0 fi fi;
add(procname(n-1, t - n^3*k^2), k=0..2);
end proc:
A:= [seq(F(n, 4*n^3), n=1..40)]; # Robert Israel, Apr 18 2019
MATHEMATICA
F[n_, t_] := F[n, t] = If[t < 0 || t > (n+1)^2*n^2, 0, If[n == 1, If[MemberQ[{0, 1, 4}, t], 1, 0], Sum[F[n-1, t - n^3*k^2], {k, 0, 2}]]];
Table[F[n, 4*n^3], {n, 1, 40}] (* Jean-François Alcover, Aug 29 2022, after Robert Israel *)
CROSSREFS
KEYWORD
nonn
AUTHOR
R. H. Hardin, Jan 10 2011
STATUS
approved