login
A184296
Number of strings of numbers x(i=1..n) in 0..2 with sum i^3*x(i)^2 equal to n^3*4.
1
1, 1, 1, 1, 1, 2, 2, 5, 9, 12, 28, 52, 101, 210, 478, 1013, 1899, 4175, 8441, 17794, 36273, 74831, 153258, 314354, 630669, 1275787, 2563582, 5137717, 10176417, 20206831, 39762000, 78252739, 152625032, 297479773, 576578998, 1114993712, 2142088060
OFFSET
1,6
LINKS
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
Column 2 of A184303.
Sequence in context: A223387 A278386 A262614 * A131133 A096569 A076607
KEYWORD
nonn
AUTHOR
R. H. Hardin, Jan 10 2011
STATUS
approved