%I #10 Dec 11 2015 12:49:56
%S 0,0,0,8,28,88,186,378,660,1104,1700,2575,3660,5148,6972,9310,12096,
%T 15616,19656,24624,30330,37100,44770,53845,63888,75600,88608,103428,
%U 119756,138376,158550,181350,206160,233728,263568,296803,332316,371628,413820,459914
%N Number of (w,x,y,z) with all terms in {1,...,n} and w>2x and y<3z.
%C For a guide to related sequences, see A211795.
%H Colin Barker, <a href="/A212516/b212516.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_16">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,2,-1,-4,0,2,0,-2,0,4,1,-2,-2,0,1).
%F a(n) = 2*a(n-2)+2*a(n-3)-a(n-4)-4*a(n-5)+2*a(n-7)-2*a(n-9)+4*a(n-11)+ a(n-12)-2*a(n-13)-2*a(n-14)+a(n-16).
%F G.f.: x^3*(8 +28*x +72*x^2 +114*x^3 +154*x^4 +172*x^5 +176*x^6 +146*x^7 +113*x^8 +64*x^9 +26*x^10 +6*x^11 +x^12) / ((1 -x)^5*(1 +x)^3*(1 -x +x^2)*(1 +x +x^2)^3). - _Colin Barker_, Dec 11 2015
%t t = Compile[{{n, _Integer}}, Module[{s = 0}, (Do[If[w > 2 x && y < 3 z, s = s + 1], {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]]; Map[t[#] &, Range[0, 50]] (* A212516 *)
%t Table[-n^2/24 - n^3/6 + 5*n^4/24 - 1/12*Floor[n/6] + (n/6 - n^2/12)*Floor[n/3] - (n/12 + 5*n^2/12)*Floor[n/2] + 1/12*Floor[(1 + n)/6] + (-n/6 + n^2/12) * Floor[(1 + n)/3], {n, 0, 50}] (* _Vaclav Kotesovec_, Dec 11 2015 *)
%o (PARI) concat(vector(3), Vec(x^3*(8 +28*x +72*x^2 +114*x^3 +154*x^4 +172*x^5 +176*x^6 +146*x^7 +113*x^8 +64*x^9 +26*x^10 +6*x^11 +x^12) / ((1 -x)^5*(1 +x)^3*(1 -x +x^2)*(1 +x +x^2)^3) + O(x^100))) \\ _Colin Barker_, Dec 11 2015
%Y Cf. A211795, A212508.
%K nonn,easy
%O 0,4
%A _Clark Kimberling_, May 20 2012