A straightforward formula: $f_{n,k}$ is the coefficient of $x^n$ in $$\frac{n!}{k!}\cdot\left( \sum_{i=1}^{\infty} \frac{i^{i-2}x^i}{i!}\right)^k$$ (clearly, the sum here can be restricted to first $n$ terms).
Max Alekseyev
- 34.3k
- 5
- 74
- 152