login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A034781
Triangle of number of rooted trees with n >= 2 nodes and height h >= 1.
49
1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 6, 8, 4, 1, 1, 10, 18, 13, 5, 1, 1, 14, 38, 36, 19, 6, 1, 1, 21, 76, 93, 61, 26, 7, 1, 1, 29, 147, 225, 180, 94, 34, 8, 1, 1, 41, 277, 528, 498, 308, 136, 43, 9, 1, 1, 55, 509, 1198, 1323, 941, 487, 188, 53, 10, 1
OFFSET
2,5
LINKS
J. Riordan, Enumeration of trees by height and diameter, IBM J. Res. Dev. 4 (1960), 473-478.
J. Riordan, The enumeration of trees by height and diameter, IBM Journal 4 (1960), 473-478. (Annotated scanned copy)
Peter Steinbach, Field Guide to Simple Graphs, Volume 3, Part 10 (For Volumes 1, 2, 3, 4 of this book see A000088, A008406, A000055, A000664, respectively.)
FORMULA
Reference gives recurrence.
T(n, k) = A375467(n, k) - A375467(n, k - 1). - Peter Luschny, Aug 30 2024
EXAMPLE
Triangle begins:
1;
1 1;
1 2 1;
1 4 3 1;
1 6 8 4 1;
1 10 18 13 5 1;
1 14 38 36 19 6 1;
thus there are 10 trees with 7 nodes and height 2.
MAPLE
b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1 or k<1, 0,
add(binomial(b((i-1)$2, k-1)+j-1, j)*b(n-i*j, i-1, k), j=0..n/i)))
end:
T:= (n, k)-> b((n-1)$2, k) -b((n-1)$2, k-1):
seq(seq(T(n, k), k=1..n-1), n=2..16); # Alois P. Heinz, Jul 31 2013
MATHEMATICA
Drop[Map[Select[#, # > 0 &] &,
Transpose[
Prepend[Table[
f[n_] :=
Nest[CoefficientList[
Series[Product[1/(1 - x^i)^#[[i]], {i, 1, Length[#]}], {x,
0, 10}], x] &, {1}, n]; f[m] - f[m - 1], {m, 2, 10}],
Prepend[Table[1, {10}], 0]]]], 1] // Grid (* Geoffrey Critzer, Aug 01 2013 *)
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i<1 || k<1, 0, Sum[Binomial[b[i-1, i-1, k-1]+j-1, j]*b[n-i*j, i-1, k], {j, 0, n/i}]]]; T[n_, k_] := b[n-1, n-1, k]-b[n-1, n-1, k-1]; Table[T[n, k], {n, 2, 16}, {k, 1, n-1}] // Flatten (* Jean-François Alcover, Feb 11 2014, after Alois P. Heinz *)
PROG
(Python)
def A034781(n, k): return A375467(n, k) - A375467(n, k - 1)
for n in range(2, 10): print([A034781(n, k) for k in range(2, n + 1)])
# Peter Luschny, Aug 30 2024
CROSSREFS
T(2n,n) = A245102(n), T(2n+1,n) = A245103(n).
Row sums give A000081.
Sequence in context: A060098 A161492 A177976 * A110470 A347699 A055080
KEYWORD
tabl,nonn,easy,nice
EXTENSIONS
More terms from Victoria A Sapko (vsapko(AT)canes.gsw.edu), Sep 19 2003
STATUS
approved