cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

A073345 Table T(n,k), read by ascending antidiagonals, giving the number of rooted plane binary trees of size n and height k.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 6, 8, 0, 0, 0, 0, 0, 0, 0, 4, 20, 0, 0, 0, 0, 0, 0, 0, 0, 1, 40, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 152, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114, 376, 144, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, Jul 31 2002

Keywords

Examples

			The top-left corner of this square array is
  1 0 0 0 0 0 0 0 0 ...
  0 1 0 0 0 0 0 0 0 ...
  0 0 2 1 0 0 0 0 0 ...
  0 0 0 4 6 6 4 1 0 ...
  0 0 0 0 8 20 40 68 94 ...
E.g. we have A000108(3) = 5 binary trees built from 3 non-leaf (i.e. branching) nodes:
_______________________________3
___\/__\/____\/__\/____________2
__\/____\/__\/____\/____\/_\/__1
_\/____\/____\/____\/____\./___0
The first four have height 3 and the last one has height 2, thus T(3,3) = 4, T(3,2) = 1 and T(3,any other value of k) = 0.
		

References

  • Luo Jian-Jin, Catalan numbers in the history of mathematics in China, in Combinatorics and Graph Theory, (Yap, Ku, Lloyd, Wang, Editors), World Scientific, River Edge, NJ, 1995.

Crossrefs

Variant: A073346. Column sums: A000108. Row sums: A001699.
Diagonals: A073345(n, n) = A011782(n), A073345(n+3, n+2) = A014480(n), A073345(n+2, n) = A073773(n), A073345(n+3, n) = A073774(n) - Henry Bottomley and AK, see the attached notes.
A073429 gives the upper triangular region of this array. Cf. also A065329, A001263.

Programs

  • Maple
    A073345 := n -> A073345bi(A025581(n), A002262(n));
    A073345bi := proc(n,k) option remember; local i,j; if(0 = n) then if(0 = k) then RETURN(1); else RETURN(0); fi; fi; if(0 = k) then RETURN(0); fi; 2 * add(A073345bi(n-i-1,k-1) * add(A073345bi(i,j),j=0..(k-1)),i=0..floor((n-1)/2)) + 2 * add(A073345bi(n-i-1,k-1) * add(A073345bi(i,j),j=0..(k-2)),i=(floor((n-1)/2)+1)..(n-1)) - (`mod`(n,2))*(A073345bi(floor((n-1)/2),k-1)^2); end;
    A025581 := n -> binomial(1+floor((1/2)+sqrt(2*(1+n))),2) - (n+1);
    A002262 := n -> n - binomial(floor((1/2)+sqrt(2*(1+n))),2);
  • Mathematica
    a[0, 0] = 1; a[n_, k_]/;k2^n-1 := 0; a[n_, k_]/;1 <= n <= k <= 2^n-1 := a[n, k] = Sum[a[n-1, k-1-i](2Sum[ a[j, i], {j, 0, n-2}]+a[n-1, i]), {i, 0, k-1}]; Table[a[n, k], {n, 0, 9}, {k, 0, 9}]
    (* or *) a[0] = 0; a[1] = 1; a[n_]/;n>=2 := a[n] = Expand[1 + x a[n-1]^2]; gfT[n_] := a[n]-a[n-1]; Map[CoefficientList[ #, x, 8]&, Table[gfT[n], {n, 9}]/.{x^i_/;i>=9 ->0}] (Callan)

Formula

(See the Maple code below. Is there a nicer formula?)
This table was known to the Chinese mathematician Ming An-Tu, who gave the following recurrence in the 1730s. a(0, 0) = 1, a(n, k) = Sum[a(n-1, k-1-i)( 2*Sum[ a(j, i), {j, 0, n-2}]+a(n-1, i) ), {i, 0, k-1}]. - David Callan, Aug 17 2004
The generating function for row n, T_n(x):=Sum[T(n, k)x^k, k>=0], is given by T_n = a(n)-a(n-1) where a(n) is defined by the recurrence a(0)=0, a(1)=1, a(n) = 1 + x a(n-1)^2 for n>=2. - David Callan, Oct 08 2005

A073773 Number of plane binary trees of size n+2 and height n.

Original entry on oeis.org

0, 0, 0, 6, 40, 152, 480, 1376, 3712, 9600, 24064, 58880, 141312, 333824, 778240, 1794048, 4096000, 9273344, 20840448, 46530560, 103284736, 228065280, 501219328, 1096810496, 2390753280, 5192548352, 11240734720, 24259854336
Offset: 0

Views

Author

Antti Karttunen, Aug 11 2002

Keywords

Examples

			a(3) = 6 because there exists only these six binary trees of size 5 and height 3:
_\/\/_______\/\/_\/_\/_____\/_\/_\/___\/___V_V___
__\/_\/___\/_\/___\/_\/___\/_\/___\/_\/___\/_\/__
___\./_____\./_____\./_____\./_____\./_____\./___
		

Crossrefs

Programs

  • Maple
    A073773 := n -> `if`((n < 3),0,((n^2 - 6)*2^(n-2)));

Formula

a(n) = A073345(n+2, n).
a(n < 3) = 0, a(n) = ((n^2 - 6)*2^(n-2)).

A073775 Polynomial (1/3)*n^3 + (9/2)*n^2 + (85/6)*n - 2.

Original entry on oeis.org

-2, 17, 47, 90, 148, 223, 317, 432, 570, 733, 923, 1142, 1392, 1675, 1993, 2348, 2742, 3177, 3655, 4178, 4748, 5367, 6037, 6760, 7538, 8373, 9267, 10222, 11240, 12323, 13473, 14692, 15982, 17345, 18783, 20298, 21892, 23567, 25325, 27168, 29098, 31117, 33227, 35430, 37728, 40123, 42617, 45212, 47910
Offset: 0

Views

Author

Antti Karttunen, Aug 11 2002

Keywords

Comments

Associated with the sequence A073774.

Programs

  • Maple
    A073775 := n -> ((1/3)*n^3 + (9/2)*n^2 + (85/6)*n - 2);
Showing 1-3 of 3 results.