%I #8 Dec 05 2015 10:12:12
%S 0,0,0,1,3,9,16,26,44,63,87,123,160,204,264,325,395,485,576,678,804,
%T 931,1071,1239,1408,1592,1808,2025,2259,2529,2800,3090,3420,3751,4103,
%U 4499,4896,5316,5784,6253,6747,7293,7840,8414,9044,9675,10335,11055,11776
%N Number of (w,x,y,z) with all terms in {1,...,n} and w+x=3y+3z.
%C For a guide to related sequences, see A211795.
%H Colin Barker, <a href="/A212566/b212566.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,2,-4,2,-1,2,-1).
%F a(n) = 2 a(n-1)-a(n-2)+2*a(n-3)-4*a(n-4)+2*a(n-5)-a(n-6)+2*a(n-7)-a(n-8).
%F G.f.: x^3*(1+x+4*x^2-x^3+x^4) / ((1-x)^4*(1+x+x^2)^2). - _Colin Barker_, Dec 05 2015
%t t = Compile[{{n, _Integer}}, Module[{s = 0},
%t (Do[If[w + x == 3 y + 3 z, s = s + 1],
%t {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];
%t Map[t[#] &, Range[0, 50]] (* A212566 *)
%o (PARI) concat(vector(3), Vec(x^3*(1+x+4*x^2-x^3+x^4)/((1-x)^4*(1+x+x^2)^2) + O(x^100))) \\ _Colin Barker_, Dec 05 2015
%Y Cf. A211795.
%K nonn,easy
%O 0,5
%A _Clark Kimberling_, May 21 2012
|