Denote $p=mn$, then the mean $\bar{k}$ you seek equals $\bar{k}=\frac{p!}{(p-j)!}f_j(p)$, with $$f_j(p)=\sum _{k=1}^{\infty } \frac{k \mathcal{S}_k^{(j)} }{p^{k}}=\frac{F_j(p)}{\prod_{n=1}^j(p-n)^2}.$$ The numerator $F_j(p)$ is a polynomial in $p$ of degree $j$, the coefficients are given by the OEIS sequence A196837, for example: $$\{F_1(p),F_2(p),\ldots F_5(p)\}=\left\{p,2 p^2-3 p,3 p^3-12 p^2+11 p,4 p^4-30 p^3+70 p^2-50 p,5 p^5-60 p^4+255 p^3-450 p^2+274 p\right\}.$$
Carlo Beenakker
- 188.3k
- 18
- 448
- 651