login
Number of ordered triples (w,x,y) with all terms in {-n,...-1,1,...,n} and w+x+y>=0.
2

%I #14 Dec 05 2017 05:45:45

%S 0,4,35,117,274,530,909,1435,2132,3024,4135,5489,7110,9022,11249,

%T 13815,16744,20060,23787,27949,32570,37674,43285,49427,56124,63400,

%U 71279,79785,88942,98774,109305,120559,132560,145332,158899,173285,188514,204610,221597

%N Number of ordered triples (w,x,y) with all terms in {-n,...-1,1,...,n} and w+x+y>=0.

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

%H Colin Barker, <a href="/A211612/b211612.txt">Table of n, a(n) for n = 0..1000</a>

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

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

%F From _Colin Barker_, Dec 04 2017: (Start)

%F G.f.: x*(4 + 19*x + x^2) / (1 - x)^4.

%F a(n) = (n*(-3 + 3*n + 8*n^2))/2.

%F (End)

%t t = Compile[{{u, _Integer}}, Module[{s = 0}, (Do[If[w + x + y >= 0, s = s + 1], {w, #}, {x, #}, {y, #}] &[Flatten[{Reverse[-#], #} &[Range[1, u]]]]; s)]];

%t Map[t[#] &, Range[0, 60]] (* A211612 *)

%t FindLinearRecurrence[%]

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

%t LinearRecurrence[{4, -6, 4, -1},{0, 4, 35, 117},36] (* _Ray Chandler_, Aug 02 2015 *)

%o (PARI) concat(0, Vec(x*(4 + 19*x + x^2) / (1 - x)^4 + O(x^40))) \\ _Colin Barker_, Dec 04 2017

%Y Cf. A211422.

%K nonn,easy

%O 0,2

%A _Clark Kimberling_, Apr 16 2012