Let $a_n$ be the number of $n\times n$ zero-one matrices such that in any row and any column there are exactly two 1.
What is the value of $a_n$ in terms of $n$ ?
Let $a_n$ be the number of $n\times n$ zero-one matrices such that in any row and any column there are exactly two 1.
What is the value of $a_n$ in terms of $n$ ?
This is OEIS A001499; the entry has numerous references. The first few non-zero values are $a_2=1$, $a_3=6$, $a_4=90$, $a_5=2040$, $a_6=67950$, and $a_7=3110940$. The entry gives the exact formula
$$a_n=\frac{n!(n-1)\Gamma\left(n-\frac12\right)}{\Gamma\left(\frac12\right)}\cdot{_1F_1}\left[2-n;\frac32-n;-\frac12\right]\;,$$
the asymptotic formula
$$a_n\sim 2\sqrt{\pi}\left(\frac{n}e\right)^{2n+\frac12}\;,$$
and the recurrence
$$a_n=\frac12n(n-1)^2\left((2n-3)a_{n-2}+(n-2)^2a_{n-3}\right)\;.$$