OFFSET
0,2
COMMENTS
A candle tree is a graph on the plane square lattice Z X Z whose edges have length one with the following properties: (a) It contains a line segment ("trunk") of length from 0 to m on the vertical axis, its lowest node is at the origin. (b) It contains horizontal line segments ("branches"); each of them intersects the trunk. (c) Each branch is allowed to have "candles", which are vertical edges of length 1, whose lower node is on a branch.
Row sums of triangle in A238241. - Philippe Deléham, Feb 21 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Alexander Malkis, Polyedges, polyominoes and the 'Digit' game, diploma thesis in computer science, Universität des Saarlandes, 2003, Saarbrücken.
Index entries for linear recurrences with constant coefficients, signature (3,1,-2,-1).
FORMULA
a(n) = Sum_{s, d, k>=0 with s+d+k=m} binomial(s+2d+1, s)*binomial(s, k);
generating function = 1/((1-x)*(1-2*x-3*x^2-x^3)).
a(n) = 3*a(n-1) + a(n-2) - 2*a(n-3) - a(n-4);
a(n) = 1 + Sum_{m=1..n} Sum_{k=1..n-m+1} binomial(k, n-m-k+1)*binomial(k+2*m-1,2*m-1). - Vladimir Kruchinin, May 12 2011
a(n) = Sum_{k=0..n} A238241(n,k). - Philippe Deléham, Feb 21 2014
a(n) - a(n-1) = A218836(n). - R. J. Mathar, Jun 17 2020
MATHEMATICA
CoefficientList[Series[1/(x^4+2x^3-x^2-3x+1), {x, 0, 30}], x] (* or *) LinearRecurrence[{3, 1, -2, -1}, {1, 3, 10, 31}, 30] (* Harvey P. Dale, Jun 14 2011 *)
PROG
(Maxima)
a(n):=sum(sum(binomial(k, n-m-k+1)*binomial(k+2*m-1, 2*m-1), k, 1, n-m+1), m, 1, n)+1; /* Vladimir Kruchinin, May 12 2011 */
(PARI) a(n)=sum(m=1, n, sum(k=1, n-m+1, binomial(k, n-m-k+1)*binomial(k+2*m-1, 2*m-1))) \\ Charles R Greathouse IV, Jun 17 2013
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
Alexander Malkis, Sep 18 2004
STATUS
approved