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
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
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