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-2 of 2 results.

A293024 Square array A(n,k), n>=0, k>=0, read by antidiagonals, where column k is the expansion of e.g.f. exp(exp(x) - Sum_{i=0..k} x^i/i!).

Original entry on oeis.org

1, 1, 1, 1, 0, 2, 1, 0, 1, 5, 1, 0, 0, 1, 15, 1, 0, 0, 1, 4, 52, 1, 0, 0, 0, 1, 11, 203, 1, 0, 0, 0, 1, 1, 41, 877, 1, 0, 0, 0, 0, 1, 11, 162, 4140, 1, 0, 0, 0, 0, 1, 1, 36, 715, 21147, 1, 0, 0, 0, 0, 0, 1, 1, 92, 3425, 115975, 1, 0, 0, 0, 0, 0, 1, 1, 36, 491, 17722, 678570
Offset: 0

Views

Author

Seiichi Manyama, Sep 28 2017

Keywords

Comments

A(n,k) is the number of set partitions of [n] into blocks of size > k.

Examples

			Square array begins:
    1,   1,  1, 1, 1, 1, 1, 1, ...
    1,   0,  0, 0, 0, 0, 0, 0, ...
    2,   1,  0, 0, 0, 0, 0, 0, ...
    5,   1,  1, 0, 0, 0, 0, 0, ...
   15,   4,  1, 1, 0, 0, 0, 0, ...
   52,  11,  1, 1, 1, 0, 0, 0, ...
  203,  41, 11, 1, 1, 1, 0, 0, ...
  877, 162, 36, 1, 1, 1, 1, 0, ...
		

Crossrefs

Columns k=0..5 give A000110, A000296, A006505, A057837, A057814, A293025.
Rows n=0..1 give A000012, A000007.
Main diagonal gives A000007.
Cf. A182931, A282988 (as triangle), A293051, A293053.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1, add(
          A(n-j, k)*binomial(n-1, j-1), j=1+k..n))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..14);  # Alois P. Heinz, Sep 28 2017
  • Mathematica
    A[0, _] = 1;
    A[n_, k_] /; 0 <= k <= n := A[n, k] = Sum[A[n-j, k] Binomial[n-1, j-1], {j, k+1, n}];
    A[, ] = 0;
    Table[A[n-k, k], {n, 0, 11}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Dec 06 2019 *)
  • Ruby
    def ncr(n, r)
      return 1 if r == 0
      (n - r + 1..n).inject(:*) / (1..r).inject(:*)
    end
    def A(k, n)
      ary = [1]
      (1..n).each{|i| ary << (k..i - 1).inject(0){|s, j| s + ncr(i - 1, j) * ary[-1 - j]}}
      ary
    end
    def A293024(n)
      a = []
      (0..n).each{|i| a << A(i, n - i)}
      ary = []
      (0..n).each{|i|
        (0..i).each{|j|
          ary << a[i - j][j]
        }
      }
      ary
    end
    p A293024(20)

Formula

E.g.f. of column k: Product_{i>k} exp(x^i/i!).
A(0,k) = 1, A(1,k) = A(2,k) = ... = A(k,k) = 0 and A(n,k) = Sum_{i=k..n-1} binomial(n-1,i)*A(n-1-i,k) for n > k.

A282988 Triangle of partitions of an n-set into boxes of size >= m.

Original entry on oeis.org

1, 2, 1, 5, 1, 1, 15, 4, 1, 1, 52, 11, 1, 1, 1, 203, 41, 11, 1, 1, 1, 877, 162, 36, 1, 1, 1, 1, 4140, 715, 92, 36, 1, 1, 1, 1, 21147, 3425, 491, 127, 1, 1, 1, 1, 1, 115975, 17722, 2557, 337, 127, 1, 1, 1, 1, 1, 678570, 98253, 11353, 793, 463, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Vladimir Kruchinin, Feb 26 2017

Keywords

Examples

			Triangle T(n,m) begins:
    1;
    2,   1;
    5,   1,   1;
   15,   4,   1,   1;
   52,  11,   1,   1,   1;
  203,  41,  11,   1,   1,   1;
  877, 162,  36,   1,   1,   1,   1;
  ...
		

Crossrefs

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(n=0, 1, add(
          T(n-j, k)*binomial(n-1, j-1), j=k..n))
        end:
    seq(seq(T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Sep 28 2017
  • Mathematica
    T[n_, m_] := T[n, m] = Which[Or[n == m, n == 0], 1, m == 0, 0, True, Sum[Binomial[n - 1, i + m - 1] T[n - i - m, m], {i, 0, n - m}]]; Table[T[n, m], {n, 11}, {m, n}] // Flatten (* Michael De Vlieger, Feb 26 2017 *)
  • Maxima
    T(n,m):=if n=m or n=0 then 1 else if m=0 then 0 else sum(binomial(n-1, i+m-1)*T(n-i-m,m), i, 0, n-m);

Formula

T(n,m) = Sum_{i=0..n-m} C(n-1, i+m-1)*T(n-i-m, m).
E.g.f. m column of T(n,m) is exp(exp(x)-Sum_{k=0..m} 1/k!x^k).
Showing 1-2 of 2 results.