I asked a question about the cluster size inside a vector here. As a result, I finally used the expression $\frac{n}{-k+n+1}$ as the average cluster size, although it´s not proved correct for every possible value fo $n$ and $k$.
Now, I´m trying to do the same procedure for a 2-dimensional matrix. So, when there is $k=2$ elements in a $n\times n$ matrix, the average cluster size is:
$$\frac{2 \binom{n^2}{2}}{2 \left(\binom{n^2}{2}-(2 (n-1) (n-1)+2 n (n-1))\right)+2 (n-1) (n-1)+2 n (n-1)}=\frac{n^2 (n+1)}{n^3+n^2-4 n+2}$$
For $k=3$, we get the following expression:
\begin{align} & \frac{3 \dbinom{n^2}{3}}{ \left( \begin{array}{l} 2 \left( \begin{array}{l} \binom{n^2}{3}-\frac{1}{6}(n-2) \left(n^4+3 n^3-20 n^2-30 n+132\right) (n-1) \\ {} -(2 (n-2) (n-2)+8 (n-1) (n-2) \\{}+4 (n-1) (n-2)+2 n (n-2)+4 (n-1) (n-1)) \end{array} \right) \\ \\ {}+\frac{3}{6} (n-1) \left(n^4+3 n^3-20 n^2-30 n+132\right) (n-2) \\ \\ {}+2 (n-2) (n-2)+8 (n-1) (n-2) \\ \\ {}+4 (n-1) (n-2)+2 n (n-2)+4 (n-1) (n-1) \end{array} \right) } \\ \\ & =\frac{n^2 \left(n^3+n^2-2 n-2\right)}{n^5+n^4-10 n^3+2 n^2+24 n-16} \end{align}
Note that the number of $3$ element arrangements in which all of them are non-adjacent is calculated in the A061996 sequence. And, for $k=1$ the cluster size is always $1$.
My goal is to create a general formula $cs(n,k)$ which returns the average cluster size for a specific value of $n$ and $k$, like in the original question, but for $n\times n$ matrices. My current approach is to find a pattern to continue the simplification of the above expressions, like in the original question, so that I can generate formulas for the next values of $k>3$, however, I only managed to generate the numerator with: $\frac{k (k-1)! \binom{n^2}{k}}{n-1}$
\\[5pt]
or\\[10pt]
, etc., in MathJax code; otherwise the expression above might be a bit more finely tuned. $\endgroup$