Solution (source code)

= Solution

Starting from $n$ singleton blocks, a <partition of a set> into $n-1$ nonempty blocks has exactly one block of size two and all other blocks of size one: the sum of the block sizes exceeds the number of blocks by exactly one. Choosing that pair determines the partition uniquely. Hence
$$
\boxed{S(n,n-1)=\binom n2,\qquad k=2.}
$$
This fixed value of $k$ works for every $n\geq2$. It is forced already by $n=2$: $S(2,1)=1$, whereas for positive $k$ the only $\binom2k$ equal to one is $\binom22$.