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.

A255970 Number T(n,k) of partitions of n into parts of exactly k sorts; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 2, 0, 3, 8, 6, 0, 5, 24, 42, 24, 0, 7, 60, 198, 264, 120, 0, 11, 144, 780, 1848, 1920, 720, 0, 15, 320, 2778, 10512, 18840, 15840, 5040, 0, 22, 702, 9342, 53184, 146760, 208080, 146160, 40320, 0, 30, 1486, 30186, 250128, 999720, 2129040, 2479680, 1491840, 362880
Offset: 0

Views

Author

Alois P. Heinz, Mar 12 2015

Keywords

Examples

			T(3,1) = 3: 1a1a1a, 2a1a, 1a.
T(3,2) = 8: 1a1a1b, 1a1b1a, 1b1a1a, 1b1b1a, 1b1a1b, 1a1b1b, 2a1b, 2b1a.
T(3,3) = 6: 1a1b1c, 1a1c1b, 1b1a1c, 1b1c1a, 1c1a1b, 1c1b1a.
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  2,   2;
  0,  3,   8,    6;
  0,  5,  24,   42,    24;
  0,  7,  60,  198,   264,    120;
  0, 11, 144,  780,  1848,   1920,    720;
  0, 15, 320, 2778, 10512,  18840,  15840,   5040;
  0, 22, 702, 9342, 53184, 146760, 208080, 146160, 40320;
  ...
		

Crossrefs

Columns k=0-1 give: A000007, A000041 (for n>0).
Main diagonal gives A000142.
Row sums give A278644.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1, k) +`if`(i>n, 0, k*b(n-i, i, k))))
        end:
    T:= (n, k)-> add(b(n$2, k-i)*(-1)^i*binomial(k, i), i=0..k):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1, k] + If[i>n, 0, k*b[n-i, i, k]]]]; T[n_, k_] := Sum[b[n, n, k -i]*(-1)^i* Binomial[k, i], {i, 0, k}]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, Feb 22 2016, after Alois P. Heinz *)

Formula

T(n,k) = Sum_{i=0..k} (-1)^i * C(k,i) * A246935(n,k-i).
T(n,k) = k! * A256130(n,k).