%I #27 Jul 14 2023 17:15:00
%S 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,
%T 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,
%U 0,1,8,20,19,0,1,9,23,25,1,0,1,9,26,30,5
%N 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.
%H Alois P. Heinz, <a href="/A238406/b238406.txt">Rows n = 0..500, flattened</a>
%e T(10,1) = 1: [10].
%e T(10,2) = 4: [5,5], [4,6], [3,7], [2,8].
%e T(10,3) = 3: [3,3,4], [2,4,4], [2,3,5].
%e Triangle T(n,k) begins:
%e 1;
%e 0;
%e 0, 1;
%e 0, 1;
%e 0, 1;
%e 0, 1, 1;
%e 0, 1, 2;
%e 0, 1, 2;
%e 0, 1, 3;
%e 0, 1, 3, 1;
%e 0, 1, 4, 3;
%e 0, 1, 4, 4;
%e 0, 1, 5, 6;
%e 0, 1, 5, 7;
%e 0, 1, 6, 9, 1;
%e ...
%p b:= proc(n, i) option remember; `if`(n=0, 1,
%p `if`(i<1, 0, b(n, i-1)+`if`(i>n, 0, (p-> expand(
%p x*(p-coeff(p, x, i-1)*x^(i-1))))(b(n-i, i)))))
%p end:
%p T:= n-> (p-> seq(coeff(p, x, i), i=0..max(0, degree(p))))(b(n$2)):
%p seq(T(n), n=0..30);
%t 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 *)
%Y Columns k=0-10 give: A000007, A000012 (for n>1), A004526(n-2) (for n>4), A244239, A244240, A244241, A244242, A244243, A244244, A244245, A244246.
%Y Row sums give A238394.
%Y Cf. A052146.
%K nonn,tabf,look
%O 0,14
%A _Alois P. Heinz_, Feb 26 2014
|