Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A138157
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A138157 Triangle read by rows: T(n,k) is the number of binary trees with n edges and path length k; 0<=k<=n(n+1)/2. +0
2
1, 0, 2, 0, 0, 1, 4, 0, 0, 0, 0, 4, 2, 8, 0, 0, 0, 0, 0, 0, 6, 8, 8, 4, 16, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 4, 28, 16, 16, 8, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 24, 36, 48, 24, 56, 40, 56, 32, 32, 16, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 60, 72, 144, 26, 168, 104, 128, 64, 176, 80, 112 (list; graph; listen)
OFFSET

0,3

COMMENT

Row n has 1+n(n+1)/2 terms.

Row sums are the Catalan numbers (A000108).

Column sums yield A095830.

Sum(k*T(n,k),k>=0)=A138156(n).

The g.f. B(w,z) in the Knuth reference is related to the above G(t,z) through B(t,z)=1+zG(t,z).

REFERENCES

D. E. Knuth, The Art of Computer Programming. Addison-Wesley, Reading, MA, 1997, Vol. 1, p. 405 (exercise 5) and p. 595 (solution).

FORMULA

G.f.=G(t,z) satisfies G(t,z)=1 + 2tzG(t,tz) + [tzG(t,tz)]^2. The row generating polynomials P[n]=P[n](t) (n=1,2,...) are given by P[n]=t^n (2P[n-1] + sum(P[i]P[n-2-i], i=0..n-2)0; P[0]=1.

EXAMPLE

T(2,3)=4 because we have the path trees LL, LR. RL, and RR, where L (R) denotes a left (right) edge; each of these four trees has path length 3.

Triangle starts:

1;

0,2;

0,0,1,4;

0,0,0,0,4,2,8;

0,0,0,0,0,0,6,8,8,4,16;

0,0,0,0,0,0,0,0,4,24,4,28,16,16,8,32;

MAPLE

P[0]:=1: for n to 7 do P[n]:=sort(expand(t^n*(2*P[n-1]+add(P[i]*P[n-2-i], i= 0..n-2)))) end do: for n from 0 to 7 do seq(coeff(P[n], t, j), j=0..(1/2)*n*(n+1)) end do; # yields sequence in triangular form

CROSSREFS

Cf. A000108, A095830, A138156.

Sequence in context: A052553 A045847 A137586 this_sequence A073429 A123634 A091866

Adjacent sequences: A138154 A138155 A138156 this_sequence A138158 A138159 A138160

KEYWORD

nonn,tabf

AUTHOR

Emeric Deutsch (deutsch(AT)duke.poly.edu), Mar 20 2008

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified July 26 23:19 EDT 2008. Contains 142293 sequences.


AT&T Labs Research