OFFSET
1,2
COMMENTS
Row sums of triangle A118413.
For fixed n, define a triangle T(r,c) counting down the first n odd numbers on the left side, T(r,1) = 2*(n-r)+1, and counting up odd numbers on the right side, T(r,r) = 2*(n+r)-3, r>1. The interior elements are set by T(r,c)=T(r-1,c-1) + T(r-1,c). The sum of all members in this triangle is a(n). - J. M. Bergot, Oct 12 2012
Row sums of triangle A277046. - Miquel Cerda, Sep 28 2016
LINKS
Altug Alkan, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (6,-13,12,-4)
FORMULA
G.f. -x*(-1-3*x+6*x^2) / ( (2*x-1)^2*(x-1)^2 ). - R. J. Mathar, Oct 15 2012
EXAMPLE
The triangle T(r,c) for n=4 has row(1)=7; row(2) = 5, 9; row(3) = 3, 14, 11; row(4) = 1, 17, 25, 13, and a sum of 7+5+9+...+13 = 105 = a(4). - J. M. Bergot, Oct 12 2012
MATHEMATICA
Table[(2 n - 1) (2^n - 1), {n, 32}] (* or *)
Rest@ CoefficientList[Series[-x (-1 - 3 x + 6 x^2)/((2 x - 1)^2*(x - 1)^2), {x, 0, 32}], x] (* Michael De Vlieger, Sep 26 2016 *)
LinearRecurrence[{6, -13, 12, -4}, {1, 9, 35, 105}, 40] (* Harvey P. Dale, Sep 12 2023 *)
PROG
(Magma)[(2*n-1)*(2^n-1): n in [1..40]]; // Vincenzo Librandi, Dec 26 2010
(PARI) a(n)=(2*n-1)*(2^n-1) \\ Charles R Greathouse IV, Oct 12 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Apr 27 2006
STATUS
approved