A212520 Number of (w,x,y,z) with all terms in {1,...,n} and w>=2x and y<3z.
0, 0, 4, 16, 56, 132, 279, 504, 880, 1380, 2125, 3090, 4392, 6006, 8134, 10640, 13824, 17568, 22113, 27360, 33700, 40810, 49247, 58740, 69696, 81900, 95992, 111384, 128968, 148260, 169875, 193440, 219904, 248336, 280041, 314262, 351864, 392274, 436810
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,2,2,-1,-4,0,2,0,-2,0,4,1,-2,-2,0,1).
Programs
-
Mathematica
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]] (* A212520 *)
-
PARI
concat([0,0], Vec(x^2*(4 +16*x +48*x^2 +92*x^3 +139*x^4 +160*x^5 +178*x^6 +162*x^7 +132*x^8 +86*x^9 +46*x^10 +14*x^11 +3*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
Formula
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).
G.f.: x^2*(4 +16*x +48*x^2 +92*x^3 +139*x^4 +160*x^5 +178*x^6 +162*x^7 +132*x^8 +86*x^9 +46*x^10 +14*x^11 +3*x^12) / ((1 -x)^5*(1 +x)^3*(1 -x +x^2)*(1 +x +x^2)^3). - Colin Barker, Dec 11 2015
Comments