login
Row sums of triangle A132898.
2

%I #16 Sep 01 2018 21:39:51

%S 1,-7,8,-22,23,-45,46,-76,77,-115,116,-162,163,-217,218,-280,281,-351,

%T 352,-430,431,-517,518,-612,613,-715,716,-826,827,-945,946,-1072,1073,

%U -1207,1208,-1350,1351,-1501,1502,-1660,1661,-1827,1828,-2002,2003,-2185,2186

%N Row sums of triangle A132898.

%H Andrew Howroyd, <a href="/A132899/b132899.txt">Table of n, a(n) for n = 1..1000</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) = n*S(n) - n + Sum_{k=1..n} S(k) where S(n) = (-1)^(n-1)*n.

%F From _Andrew Howroyd_, Aug 28 2018: (Start)

%F a(n) = (-1)^(n-1)*(n^2 + ceiling(n/2)) - n.

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

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

%F (End)

%e a(4) = 22 = sum of row 4 terms of triangle A132898: (-4, -7, -2, -9).

%e a(4) = 22 = n*S(n) - n + SUM_{1,n}:S(n) = 4*(-4) - 4 + (1, -2, 3, -4) = -16 - 4 - 2.

%t LinearRecurrence[{-1, 2, 2, -1, -1},{1, -7, 8, -22, 23}, 50] (* _Stefano Spezia_, Sep 01 2018 *)

%o (PARI) a(n)={(-1)^(n-1)*(n^2 + ceil(n/2)) - n} \\ _Andrew Howroyd_, Aug 28 2018

%o (PARI) Vec((1 - 6*x - x^2 - 2*x^3)/((1 - x)^2*(1 + x)^3) + O(x^50)) \\ _Andrew Howroyd_, Aug 28 2018

%Y Cf. A132898.

%K sign

%O 1,2

%A _Gary W. Adamson_, Sep 03 2007

%E Terms a(11) and beyond from _Andrew Howroyd_, Aug 28 2018