A079126 Triangle T(n,k) of numbers of partitions of n into distinct positive integers <= k, 0<=k<=n.
1, 0, 1, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 2, 0, 0, 0, 1, 2, 3, 0, 0, 0, 1, 2, 3, 4, 0, 0, 0, 0, 2, 3, 4, 5, 0, 0, 0, 0, 1, 3, 4, 5, 6, 0, 0, 0, 0, 1, 3, 5, 6, 7, 8, 0, 0, 0, 0, 1, 3, 5, 7, 8, 9, 10, 0, 0, 0, 0, 0, 2, 5, 7, 9, 10, 11, 12, 0, 0, 0, 0, 0, 2, 5, 8, 10, 12, 13, 14, 15, 0, 0, 0, 0, 0, 1, 4, 8, 11, 13, 15, 16, 17, 18
Offset: 0
Examples
The seven partitions of n=5 are {5}, {4,1}, {3,2}, {3,1,1}, {2,2,1}, {2,1,1,1} and {1,1,1,1,1}. Only two of them ({4,1} and {3,2}) have distinct parts <= 4, so T(5,4) = 2. Triangle T(n,k) begins: 1; 0, 1; 0, 0, 1; 0, 0, 1, 2; 0, 0, 0, 1 ,2; 0, 0, 0, 1, 2, 3; 0, 0, 0, 1, 2, 3, 4; 0, 0, 0, 0, 2, 3, 4, 5; 0, 0, 0, 0, 1, 3, 4, 5, 6; 0, 0, 0, 0, 1, 3, 5, 6, 7, 8; 0, 0, 0, 0, 1, 3, 5, 7, 8, 9, 10; 0, 0, 0, 0, 0, 2, 5, 7, 9, 10, 11, 12; 0, 0, 0, 0, 0, 2, 5, 8, 10, 12, 13, 14, 15; ...
Links
- Alois P. Heinz, Rows n = 0..140, flattened
- Eric Weisstein's World of Mathematics, Partition Function Q.
Crossrefs
Programs
-
Maple
T:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, T(n, i-1)+`if`(i>n, 0, T(n-i, i-1)))) end: seq(seq(T(n,k), k=0..n), n=0..20); # Alois P. Heinz, May 11 2015
-
Mathematica
T[n_, i_] := T[n, i] = If[n==0, 1, If[i<1, 0, T[n, i-1] + If[i>n, 0, T[n-i, i-1]]]]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 20}] // Flatten (* Jean-François Alcover, Jun 30 2015, after Alois P. Heinz *)
Formula
T(n,k) = b(0,n,k), where b(m,n,k) = 1+sum(b(i,j,k): m
T(n,k) = coefficient of x^n in product_{i=1..k} (1+x^i). - Vladeta Jovovic, Aug 07 2003
Comments