login
A129137
Number of trees on [n], rooted at 1, in which 2 is a descendant of 3.
5
0, 0, 1, 5, 37, 366, 4553, 68408, 1206405, 24447440, 560041201, 14315792256, 404057805989, 12482986261760, 419042630871225, 15189786100468736, 591374264243364037, 24612549706061862912, 1090556290466098198625
OFFSET
1,4
LINKS
Washington G. Bomfim, Table of n, a(n) for n = 1..50
H. Bergeron, E. M. F. Curado, J. P. Gazeau and L. M. C. S. Rodrigues, A note about combinatorial sequences and Incomplete Gamma function, arXiv preprint arXiv: 1309.6910, 2013
FORMULA
Sum_{r=1..n-2} (n-3)!*n^(n-2-r)/(n-2-r)! counts these trees by the length r of the path from 1 to 3.
A057500(n) = binomial(n-1, 2)*a(n).
EXAMPLE
a(4)=5 counts {1->3->2, 1->4}, {1->3->2, 3->4}, {1->3->2->4}, {1->3->4->2}, {1->4->3->2}.
MATHEMATICA
Table[Exp[n]*Gamma[n-2, n] // Round, {n, 1, 50}] (* Jean-François Alcover, Jan 15 2014 *)
PROG
(Python) # b(n) computes 0-based column 3 of A398187.
def b(n: int) -> int:
if n == 0: return 1
x = n + 3; v = 1; F = 1
for k in range(1, n + 1):
F *= (n - k + 1)
v = v * x + F
return v
A129137 = lambda n: 0 if n < 3 else b(n - 3)
print([A129137(n) for n in range(1, 20)]) # Peter Luschny, Jul 29 2026
CROSSREFS
Sequence in context: A025168 A084358 A050351 * A357397 A276232 A055869
KEYWORD
nonn
AUTHOR
David Callan, Mar 30 2007
STATUS
approved