login
Number of strings of numbers x(i=1..n) in 0..4 with sum i^3*x(i)^2 equal to n^3*16.
1

%I #17 Aug 29 2022 10:05:06

%S 1,1,1,2,1,5,19,65,179,567,1971,7188,24104,86560,307758,1093010,

%T 3680499,12984253,44872804,155894872,524533909,1798853267,6095276268,

%U 20640244000,68424020576,228663331673,756885973017,2497335148084,8126657372315,26483584838833,85638964006761,275736953129009

%N Number of strings of numbers x(i=1..n) in 0..4 with sum i^3*x(i)^2 equal to n^3*16.

%C Column 4 of A184303

%H Robert Israel, <a href="/A184298/b184298.txt">Table of n, a(n) for n = 1..60</a>

%e All solutions for n=5

%e ..0

%e ..0

%e ..0

%e ..0

%e ..4

%p F:= proc(n, t) option remember;

%p local k, r;

%p if t < 0 or t > 4*(n+1)^2*n^2 then return 0 fi;

%p if n = 1 then if member(t,[0,1,4,9,16]) then return 1 else return 0 fi fi;

%p add(procname(n-1, t - n^3*k^2),k=0..4);

%p end proc:

%p seq(F(n,16*n^3), n=1..33); # _Robert Israel_, Apr 18 2019

%t F[n_, t_] := F[n, t] = If[t<0 || t>4(n+1)^2*n^2, 0, If[n == 1, If[MemberQ[ {0, 1, 4, 9, 16}, t], 1, 0], Sum[F[n-1, t - n^3*k^2], {k, 0, 4}]]];

%t Table[F[n, 16*n^3], {n, 1, 33}] (* _Jean-François Alcover_, Aug 29 2022, after _Robert Israel_ *)

%K nonn

%O 1,4

%A _R. H. Hardin_, Jan 10 2011

%E a(24)-a(32) from _Robert Israel_, Apr 18 2019