login
Number of (w,x,y,z) with all terms in {1,...,n} and 3w<x+y+z+n.
3

%I #19 Dec 04 2016 19:46:30

%S 0,1,12,63,202,496,1034,1923,3289,5280,8062,11820,16761,23110,31111,

%T 41030,53151,67777,85233,105862,130026,158109,190513,227659,269990,

%U 317967,372070,432801,500680,576246,660060,752701,854767,966878

%N Number of (w,x,y,z) with all terms in {1,...,n} and 3w<x+y+z+n.

%C a(n)+A212250(n) = n^4.

%C For a guide to related sequences, see A211795.

%H <a href="/index/Rec">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,5,-5,6,-4,1).

%F a(n) = 4*a(n-1)-6*a(n-2)+5*a(n-3)-5*a(n-4)+6*a(n-5)-4*a(n-6)+a(n-7).

%F G.f.: x*(1+8*x+21*x^2+17*x^3+11*x^4+x^5)/((1+x+x^2)*(1-x)^5). [_Bruno Berselli_, Jun 05 2012]

%F a(n) = (59*n^4 -10*n^3 +5*n^2 -6*n -8*((((n+1) mod 3) +(-1)^((n+1) mod 3))*(-1)^(n mod 3)))/72. [_Bruno Berselli_, Jun 05 2012]

%t t = Compile[{{n, _Integer}}, Module[{s = 0},

%t (Do[If[3 w < x + y + z + n, s = s + 1],

%t {w, 1, #}, {x, 1, #}, {y, 1, #}, {z, 1, #}] &[n]; s)]];

%t Map[t[#] &, Range[0, 40]] (* A212249 *)

%t (* _Peter J. C. Moses_, Apr 13 2012 *)

%Y Cf. A211795, A212247.

%K nonn,easy

%O 0,3

%A _Clark Kimberling_, May 09 2012