The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A140960 a(n) = (2*(-1)^n - 2^(n+1) + 3*n*2^n)/9. 4
 0, 0, 2, 6, 18, 46, 114, 270, 626, 1422, 3186, 7054, 15474, 33678, 72818, 156558, 334962, 713614, 1514610, 3203982, 6757490, 14214030, 29826162, 62448526, 130489458, 272163726, 566697074, 1178133390, 2445745266, 5070447502, 10498808946, 21713445774, 44858547314 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Specify that a triangle has T(n,0) = T(n,n) = A001045(n), and T(r,c) = T(r-1,c-1) + T(r-1,c). The sum of the terms in the first n rows is a(n+1). - J. M. Bergot, May 21 2013 a(n) is the difference between the total number of runs of equal parts in the compositions of n+1, and the compositions of n+1. - Gregory L. Simay, May 04 2017 LINKS Vincenzo Librandi, Table of n, a(n) for n = 0..1000 Index entries for linear recurrences with constant coefficients, signature (3,0,-4) FORMULA a(n+1) - 2*a(n) = A078008(n+1) = 2*A001045(n). G.f.: 2*x^2/((1+x)*(1-2*x)^2). a(n) = 2*A045883(n-1). a(n) = 3*a(n-1) - 4*a(n-3), n > 2. a(n) = A059570(n+1) - A011782(n+1). - Gregory L. Simay, May 04 2017 MATHEMATICA LinearRecurrence[{3, 0, -4}, {0, 0, 2}, 40] (* Harvey P. Dale, Apr 14 2015 *) PROG (MAGMA) [( 2*(-1)^n-2^(n+1)+3*n*2^n)/9: n in [0..40]]; // Vincenzo Librandi, Aug 08 2011 (PARI) a(n)=(2*(-1)^n-2^(n+1)+3*n*2^n)/9 \\ Charles R Greathouse IV, Oct 16 2015 CROSSREFS Sequence in context: A308305 A054136 A232600 * A072827 A248169 A002529 Adjacent sequences:  A140957 A140958 A140959 * A140961 A140962 A140963 KEYWORD nonn,easy AUTHOR Paul Curtz, Jul 26 2008 EXTENSIONS Definition replaced with Lava's closed form of August 2008 by R. J. Mathar, Feb 11 2010 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 11 03:12 EDT 2021. Contains 342886 sequences. (Running on oeis4.)