A238406 Number T(n,k) of partitions of n into k parts such that every i-th smallest part (counted with multiplicity) is different from i; triangle T(n,k), n>=0, 0<=k<=floor((sqrt(9+8*n)-3)/2) read by rows.
1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 2, 0, 1, 2, 0, 1, 3, 0, 1, 3, 1, 0, 1, 4, 3, 0, 1, 4, 4, 0, 1, 5, 6, 0, 1, 5, 7, 0, 1, 6, 9, 1, 0, 1, 6, 11, 4, 0, 1, 7, 13, 7, 0, 1, 7, 15, 11, 0, 1, 8, 18, 15, 0, 1, 8, 20, 19, 0, 1, 9, 23, 25, 1, 0, 1, 9, 26, 30, 5
Offset: 0
Examples
T(10,1) = 1: [10]. T(10,2) = 4: [5,5], [4,6], [3,7], [2,8]. T(10,3) = 3: [3,3,4], [2,4,4], [2,3,5]. Triangle T(n,k) begins: 1; 0; 0, 1; 0, 1; 0, 1; 0, 1, 1; 0, 1, 2; 0, 1, 2; 0, 1, 3; 0, 1, 3, 1; 0, 1, 4, 3; 0, 1, 4, 4; 0, 1, 5, 6; 0, 1, 5, 7; 0, 1, 6, 9, 1; ...
Links
- Alois P. Heinz, Rows n = 0..500, flattened
Crossrefs
Programs
-
Maple
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, b(n, i-1)+`if`(i>n, 0, (p-> expand( x*(p-coeff(p, x, i-1)*x^(i-1))))(b(n-i, i))))) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..max(0, degree(p))))(b(n$2)): seq(T(n), n=0..30);
-
Mathematica
b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, Function[p, Expand[x*(p - Coefficient[p, x, i-1]*x^(i-1))]][b[n-i, i]]]] ]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Max[0, Exponent[p, x]]}]][b[n, n]]; Table[T[n], {n, 0, 30}] // Flatten (* Jean-François Alcover, Feb 08 2017, translated from Maple *)