TITLE: How to calculate number of matrices contains 2-zeroes lines
QUESTION [9 upvotes]: Consider a matrix $A \in Mat_{n \times n}(\{0,1\})$. Now we want to calculate the amount of 2-zeroes lines in matrix, i.e. consider  a matrix $A : $
\begin{pmatrix}
  1& 1 & 1 & \dots & 1\\
  0 & 0 & 0  &\dots & 0\\
  0 & 0 & 0  &\dots & 0\\
  1& 1 & 1 & \dots & 1\\
  \dots & \dots & \dots &\dots &\dots
\end{pmatrix}
This matrix has two consecutive lines containing zeroes. 
We need to find number of matrix from $Mat_{n \times n}(\{0,1\})$ containig such propertie.
Also I need to mention that this matrices are appropriates :
$\begin{pmatrix}
  1& 1 & 1 & \dots & 1\\
  0 & 0 & 0  &\dots & 0\\
  0 & 0 & 0  &\dots & 0\\
    0 & 0 & 0  &\dots & 0\\
  \dots & \dots & \dots &\dots &\dots
\end{pmatrix}$ ,$\begin{pmatrix}
  1& 1 & 0 & \dots & 1\\
  0 & 0 & 0  &\dots & 0\\
  0 & 0 & 0  &\dots & 0\\
    1 & 1 & 0  &\dots & 1\\
  \dots & \dots & \dots &\dots &\dots
\end{pmatrix}$ ,  $\begin{pmatrix}
  1& 0 & 0 & 1& \dots & 1\\
  1 & 0 & 0 &1  &\dots & 1\\
  1 & 0 & 0  &1&\dots & 1\\
    1 & 0 & 0 &1 &\dots & 1\\
  \dots & \dots &\dots& \dots &\dots &\dots
\end{pmatrix}$, 
So it doesn't matter where should be the 2-lines of zeroes in row or in column, or it doesn't matter it 3-lines the main property that there should be at least one 2-zeroes line.
I've tried to calculate it by step, i.e. :
$\displaystyle \sum_{k=2n}^{4n-5}2(n-1)\binom{n^{2}}{k-2n} + \sum_{k=4n-4}^{...}\binom{n^{2}}{k-2n}-\dots$ this dotes arise from repeating combination. This is the problem I've stuck. Any ideas ?
Edit :
All valid matrices for $n = 3$
$\begin{pmatrix}
  1& 1 & 1 \\
  0& 0 & 0 \\
  0& 0 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 1 & 1 \\
  0& 0 & 0 \\
  0& 0 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  1& 0 & 1 \\
  0& 0 & 0 \\
  0& 0 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  1& 1 & 0 \\
  0& 0 & 0 \\
  0& 0 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 1 \\
  0& 0 & 0 \\
  0& 0 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  1& 0 & 0 \\
  0& 0 & 0 \\
  0& 0 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 1 & 0 \\
  0& 0 & 0 \\
  0& 0 & 0 \\
\end{pmatrix}$, $\begin{pmatrix}
  0& 0 & 0 \\
  0& 0 & 0 \\
  0& 0 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 1 \\
  0& 0 & 1 \\
  0& 0 & 1 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 0 \\
  0& 0 & 1 \\
  0& 0 & 1 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 1 \\
  0& 0 & 0 \\
  0& 0 & 1 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 1 \\
  0& 0 & 1 \\
  0& 0 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 0 \\
  0& 0 & 0 \\
  0& 0 & 1 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 0 \\
  0& 0 & 1 \\
  0& 0 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 0 \\
  0& 0 & 0 \\
  1 & 1 & 1 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 0 \\
  0& 0 & 0 \\
  0 & 1 & 1 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 0 \\
  0& 0 & 0 \\
  1 & 0 & 1 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 0 \\
  0& 0 & 0 \\
  1 & 1 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 0 \\
  0& 0 & 0 \\
  0 & 0 & 1 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 0 \\
  0& 0 & 0 \\
  0 & 1 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  1& 0 & 0 \\
  1& 0 & 0 \\
  1 & 0 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  0& 0 & 0 \\
  1& 0 & 0 \\
  1 & 0 & 0 \\
\end{pmatrix}$ , $\begin{pmatrix}
  1& 0 & 0 \\
  0& 0 & 0 \\
  1 & 0 & 0 \\
\end{pmatrix}$  , $\begin{pmatrix}
  1& 0 & 0 \\
  1& 0 & 0 \\
  0 & 0 & 0 \\
\end{pmatrix}$  , $\begin{pmatrix}
  0& 0 & 0 \\
  1& 0 & 0 \\
  0 & 0 & 0 \\
\end{pmatrix}$ . I guess that's all for $n =3$.

REPLY [3 votes]: Let me suggest a different strategy. I think it is easier to count the complement of the set of matrices you ask for. Say $I_n$ is the number you are interested in, then I will describe how to count $2^{n^2}-I_n$ which is the number of square $n\times n$ matrices with no consecutive zero lines or consecutive zero columns. 
Consider such a matrix. Let $m$ be the number of non-zero lines, and $k$ the number of non-zero columns. By removing the $n-m$ zero lines and the $n-k$ zero columns you obtain a $m\times k$ matrix with no zero line and no zero column. Let $J_{m,k}$ be the number of such matrices. To recover $2^{n^2}-I_n$ from the $J_{m,k}$ it suffices to count the ways to insert the zero lines and columns between the non-zero lines/columns or before the first non-zero line/column or after the last non-zero line/column. We thus have 
$$ 2^{n^2}-I_n=\sum_{0\leq m,k \leq n} {k+1 \choose n-k} {m+1 \choose n-m} J_{m,k} $$
Of course, there are a number of zero summands as I wrote it, one can be more precise on the bounds of the indices. 
Finally it remains to count $J_{m,k}$. This should be a tractable inclusion-exclusion problem as it amounts to the number of family of $m$ elements of $\{0,1\}^k$, considered as vectors in $\mathbb{R}^k$, such that:
1) no vector is the zero vector (i.e. no zero line)
2) not all vectors lie in a common coordinate hyperplane (i.e. no zero column).
Edit: To complete the answer. 
Using inclusion/exclusion to compute $J_{m,k}$ yields
$$ J_{m,k}= \sum_{j=0}^{k} {k \choose j}(-1)^{k-j}(2^j-1)^m $$
hence after rewriting, 
$$ I_n= 2^{n^2}-\sum_{\frac{n-1}{2}<m,k\leq n}\sum_{0\leq i\leq m}\sum_{0\leq j\leq k} {k+1 \choose n-k}{m+1 \choose n-m}{k \choose j}{m \choose i} (-1)^{k+m-i-j}2^{ij} $$ 
It is not clear if the expression can be simplified in any way. The first values are $I_3=25$ (which is consistent with the list above), $I_4=1368$, $I_5=249175$, etc. It does not appear in the OEIS.