%I #14 Sep 05 2016 08:46:33
%S 0,0,0,3,11,24,45,76,117,171,240,324,426,548,690,855,1045,1260,1503,
%T 1776,2079,2415,2786,3192,3636,4120,4644,5211,5823,6480,7185,7940,
%U 8745,9603,10516,11484,12510,13596,14742,15951,17225,18564,19971
%N Number of (w,x,y,z) with all terms in {1,...,n} and 3w=x+y+z+n+2.
%C Also, the number of (w,x,y,z) with all terms in {1,...,n} and 3w=x+y+z-n-2.
%C For a guide to related sequences, see A211795.
%F a(n) = 3*a(n-1)-3*a(n-2)+2*a(n-3)-3*a(n-4)+3*a(n-5)-a(n-6).
%F From _Benedict W. J. Irwin_, Sep 05 2016: (Start)
%F a(n)=2/9-n/2-n^2/3+5*n^3/18-2/9*cos(2*n*Pi/3)+4*sin(2*n*Pi/3)/(9*sqrt(3)).
%F G.f.: x^3*(3+2*x)/((x-1)^4*(1+x+x^2)).
%F (End)
%t t = Compile[{{n, _Integer}}, Module[{s = 0},
%t (Do[If[3 w == x + y + z + n + 2, s = s + 1],
%t {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
%t Map[t[#] &, Range[0, 40]] (* A212252 *)
%t (* _Peter J. C. Moses_, Apr 13 2012 *)
%t Table[2/9-n/2-n^2/3+5n^3/18-2/9Cos[2 n Pi/3] + 4Sin[2 n Pi/3]/9/Sqrt[3], {n, 0, 20}] (* _Benedict W. J. Irwin_, Sep 05 2016 *)
%Y Cf. A211795, A212251.
%K nonn,easy
%O 0,4
%A _Clark Kimberling_, May 15 2012
|