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

%I #28 Sep 08 2022 08:46:02

%S 0,0,0,1,3,5,9,12,18,22,30,35,45,51,63,70,84,92,108,117,135,145,165,

%T 176,198,210,234,247,273,287,315,330,360,376,408,425,459,477,513,532,

%U 570,590,630,651,693,715,759,782,828,852,900,925,975,1001,1053,1080,1134,1162

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

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

%C Partial sums of A029578. - _Reinhard Zumkeller_, Nov 27 2012

%H Reinhard Zumkeller, <a href="/A211538/b211538.txt">Table of n, a(n) for n = 1..10000</a>

%H Bruno Berselli, <a href="/A211538/a211538.jpg">Illustration of the initial positive terms</a>

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

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

%F a(n) = (6*n^2-26*n+25-(2*n-7)*(-1)^n)/16, from _Luce ETIENNE_. [_Bruno Berselli_, Jun 03 2014]

%F From _Wesley Ivan Hurt_, May 18 2015: (Start)

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

%F a(n) = Sum_{i=ceiling((n-3)/2)..n-3} i. (End)

%p A211538:=n->(6*n^2-26*n+25-(2*n-7)*(-1)^n)/16: seq(A211538(n), n=1..100); # _Wesley Ivan Hurt_, May 18 2015

%t t[n_] := t[n] = Flatten[Table[2 w + 2 x + y - 2 n, {w, n}, {x, n}, {y, n}]]; c[n_] := Count[t[n], 0]; t = Table[c[n], {n, 0, 70}]

%t Table[(6*n^2 - 26*n + 25 - (2*n - 7)*(-1)^n)/16, {n, 100}] (* _Wesley Ivan Hurt_, May 18 2015 *)

%t LinearRecurrence[{1, 2, -2, -1, 1}, {0, 0, 0, 1, 3}, 70] (* _Vincenzo Librandi_, May 19 2015 *)

%o (Haskell)

%o a211538 n = a211538_list !! (n-1)

%o a211538_list = scanl (+) 0 a029578_list

%o -- _Reinhard Zumkeller_, Nov 27 2012

%o (Magma) [(6*n^2-26*n+25-(2*n-7)*(-1)^n)/16: n in [1..60]]; // _Bruno Berselli_, Jun 03 2014

%Y Cf. A211422.

%K nonn,easy

%O 1,5

%A _Clark Kimberling_, Apr 15 2012