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.

A143398 Triangle T(n,k) = number of forests of labeled rooted trees of height at most 1, with n labels, where each root contains k labels, n>=0, 0<=k<=n.

Original entry on oeis.org

1, 0, 1, 0, 3, 1, 0, 10, 3, 1, 0, 41, 9, 4, 1, 0, 196, 40, 10, 5, 1, 0, 1057, 210, 30, 15, 6, 1, 0, 6322, 1176, 175, 35, 21, 7, 1, 0, 41393, 7273, 1176, 105, 56, 28, 8, 1, 0, 293608, 49932, 7084, 756, 126, 84, 36, 9, 1, 0, 2237921, 372060, 42120, 6510, 378, 210, 120, 45, 10, 1
Offset: 0

Views

Author

Alois P. Heinz, Aug 12 2008

Keywords

Examples

			T(4,2) = 9: 3->{1,2}<-4, 2->{1,3}<-4, 2->{1,4}<-3, 1->{2,3}<-4, 1->{2,4}<-3, 1->{3,4}<-2, {1,2}{3,4}, {1,3}{2,4}, {1,4}{2,3}.
Triangle begins:
  1;
  0,   1;
  0,   3,  1;
  0,  10,  3,  1;
  0,  41,  9,  4,  1;
  0, 196, 40, 10,  5,  1;
  ...
		

Crossrefs

Main diagonal gives A000012.
Row sums give A143406.
T(2n,n) gives A029651.

Programs

  • Maple
    u:= (n, k)-> `if`(k=0, 0, floor(n/k)):
    T:= (n, k)-> n! *add(i^(n-k*i)/ ((n-k*i)! *i! *k!^i), i=0..u(n, k)):
    seq(seq(T(n, k), k=0..n), n=0..12);
  • Mathematica
    t[n_, n_] = 1; t[, 0] = 0; t[n, k_] := n!*Sum[i^(n-k*i)/((n-k*i)!*i!*k!^i), {i, 0, n/k}]; Table[t[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 19 2013 *)
  • PARI
    u(n,k) = if(k==0, 0, n\k);
    T(n, k) = n!*sum(j=0, u(n, k), j^(n-k*j)/(k!^j*j!*(n-k*j)!)); \\ Seiichi Manyama, May 13 2022

Formula

T(n,k) = n! * Sum_{i=0..u(n,k)} i^(n-k*i)/((n-k*i)!*i!*k!^i) with u(n,k) = 0 if k=0 and u(n,k) = floor(n/k) else.