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.

A216652 Triangular array read by rows: T(n,k) is the number of compositions of n into exactly k distinct parts.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 4, 1, 4, 6, 1, 6, 6, 1, 6, 12, 1, 8, 18, 1, 8, 24, 24, 1, 10, 30, 24, 1, 10, 42, 48, 1, 12, 48, 72, 1, 12, 60, 120, 1, 14, 72, 144, 120, 1, 14, 84, 216, 120, 1, 16, 96, 264, 240, 1, 16, 114, 360, 360, 1, 18, 126, 432, 600, 1, 18, 144, 552, 840
Offset: 1

Views

Author

Geoffrey Critzer, Sep 12 2012

Keywords

Comments

Same as A072574, with zeros dropped. [Joerg Arndt, Oct 20 2012]
Row sums = A032020.
Row n contains A003056(n) = floor((sqrt(8*n+1)-1)/2) terms (number of terms increases by one at each triangular number).

Examples

			Triangle starts:
[ 1]  1;
[ 2]  1;
[ 3]  1, 2;
[ 4]  1, 2;
[ 5]  1, 4;
[ 6]  1, 4, 6;
[ 7]  1, 6, 6;
[ 8]  1, 6, 12;
[ 9]  1, 8, 18;
[10]  1, 8, 24, 24;
[11]  1, 10, 30, 24;
[12]  1, 10, 42, 48;
[13]  1, 12, 48, 72;
[14]  1, 12, 60, 120;
[15]  1, 14, 72, 144, 120;
[16]  1, 14, 84, 216, 120;
[17]  1, 16, 96, 264, 240;
[18]  1, 16, 114, 360, 360;
[19]  1, 18, 126, 432, 600;
[20]  1, 18, 144, 552, 840;
T(5,2) = 4 because we have: 4+1, 1+4, 3+2, 2+3.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n<0, 0, `if`(n=0, 1,
          `if`(k<1, 0, b(n, k-1) +b(n-k, k))))
        end:
    T:= (n, k)-> b(n-k*(k+1)/2, k)*k!:
    seq(seq(T(n, k), k=1..floor((sqrt(8*n+1)-1)/2)), n=1..24);  # Alois P. Heinz, Sep 12 2012
  • Mathematica
    nn=20;f[list_]:=Select[list,#>0&];Map[f,Drop[CoefficientList[Series[ Sum[Product[j y x^j/(1-x^j),{j,1,k}],{k,0,nn}],{x,0,nn}],{x,y}],1]]//Flatten

Formula

G.f.: Sum_{i>=0} Product_{j=1..i} y*j*x^j/(1-x^j).
T(n,k) = A008289(n,k)*k!.