OFFSET
0,2
COMMENTS
a(n) = 2*A006419(n).
If (2*n+3) prime, then A138156(n) mod (2*n+3) == 0. - Alzhekeyev Ascar M, Jul 19 2011
REFERENCES
D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, 1997, Vol. 1, p. 405 (exercise 5) and p. 595 (solution).
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..1659
Jean-Luc Baril and José L. Ramírez, Fibonacci and Catalan paths in a wall, 2023.
FORMULA
a(n) = 4^(n+1) - (3*n+4) * C(2*n+2,n+1)/(n+2).
G.f.: 1/(z*(1-4*z)) - ((1-z)/sqrt(1-4*z)-1)/z^2.
D-finite with recurrence (n+2)*a(n) +(-9*n-10)*a(n-1) +2*(12*n+1)*a(n-2) +8*(-2*n+3)*a(n-3)=0. - R. J. Mathar, Jul 26 2022
EXAMPLE
a(1) = 2 because the trees with one edge are (i) root with a left child and (ii) root with a right child, each having path length 1.
MAPLE
a:= n-> 4^(n+1)-(3*n+4)*binomial(2*n+2, n+1)/(n+2): seq(a(n), n=0..22);
MATHEMATICA
Table[4^(n+1)-(3n+4) Binomial[2n+2, n+1]/(n+2), {n, 0, 30}] (* Harvey P. Dale, Dec 14 2014 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Mar 20 2008
STATUS
approved