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.

A077227 Triangle of compositions of n into exactly k parts each no more than k.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 1, 3, 1, 0, 0, 6, 4, 1, 0, 0, 7, 10, 5, 1, 0, 0, 6, 20, 15, 6, 1, 0, 0, 3, 31, 35, 21, 7, 1, 0, 0, 1, 40, 70, 56, 28, 8, 1, 0, 0, 0, 44, 121, 126, 84, 36, 9, 1, 0, 0, 0, 40, 185, 252, 210, 120, 45, 10, 1, 0, 0, 0, 31, 255, 456, 462, 330, 165, 55, 11, 1, 0, 0, 0, 20
Offset: 1

Views

Author

Henry Bottomley, Oct 29 2002

Keywords

Examples

			T(6,3)=7 since 6 can be written as 1+2+3, 1+3+2, 2+1+3, 2+2+2, 2+3+1, 3+1+2, or 3+2+1.
Triangle begins:
1;
0, 1;
0, 2, 1;
0, 1, 3, 1;
0, 0, 6, 4, 1;
0, 0, 7, 10, 5, 1;
0, 0, 6, 20, 15, 6, 1;
0, 0, 3, 31, 35, 21, 7, 1;
0, 0, 1, 40, 70, 56, 28, 8, 1;
0, 0, 0, 44, 121, 126, 84, 36, 9, 1;
0, 0, 0, 40, 185, 252, 210, 120, 45, 10, 1; ...
where column sums are k^k (A000312).
		

Crossrefs

Column sums are A000312. Row sums are A077229. Central diagonal is A000984 offset. Right hand side is right hand side of A007318. Cf. A077228.

Programs

  • PARI
    T(n,k)=polcoeff(((1-x^k)/(1-x +x*O(x^n)))^k,n-k)
    for(n=1,12,for(k=1,n,print1(T(n,k),", "));print()) \\ Paul D. Hanna, Jan 25 2013

Formula

T(n, k) = A077228(n, k) - A077228(n-1, k).
If n>=k^2, T(n, k) = 0. If k<=n<2k, T(n, k) = C(n-1, k-1).
G.f. of column k is: x^k*(1-x^k)^k/(1-x)^k for k>=1. - Paul D. Hanna, Jan 25 2013