proposed
approved
proposed
approved
editing
proposed
b[n_, i_] := b[n, i] = If[n==0, {1, 0}, If[i<1, {0, 0}, b[n, i-1] + Sum[ Function[p, {0, p[[1]] + Expand[p[[2]]*x^j]}][b[n-i*j, i-1]], {j, 1, n/i} ]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, n][[2]]]; Table[T[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Jan 15 2016, after Alois P. Heinz *)
approved
editing
editing
approved
proposed
approved
editing
proposed
T(n,k) = number of partitions of n in which the 2nd largest part is k (0 if all parts are equal). Example: T(7,2) = 4 because we have [3,2,1,1], [3,2,2], [4,2,1], and [5,2].
approved
editing
editing
approved
Alois P. Heinz, <a href="/A264402/b264402.txt">Rows n = 1..350, flattened</a>
# second Maple program:
b:= proc(n, i) option remember; `if`(n=0, [1, 0],
`if`(i<1, 0, b(n, i-1) +add((p->[0, p[1]+
expand(p[2]*x^j)])(b(n-i*j, i-1)) , j=1..n/i)))
end:
T:= n->(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)[2]):
seq(T(n), n=1..20); # Alois P. Heinz, Nov 29 2015