<s>[INST] Determinant of a matrix filled with elements of the Thue–Morse sequence Let $n$ be a positive integer. Suppose we fill a square matrix $n\times n$ row-by-row with the first $n^2$ elements of the Thue–Morse sequence (with indexes from $0$ to $n^2-1$). Let $\mathcal D_n$ be the determinant of this matrix. For example,
$$\small\mathcal D_7=\left| 
\begin{array}{}
 t_0 & t_1 & t_2 & t_3 & t_4 & t_5 & t_6 \\
 t_7 & t_8 & t_9 & t_{10} & t_{11} & t_{12} & t_{13} \\
 t_{14} & t_{15} & t_{16} & t_{17} & t_{18} & t_{19} & t_{20} \\
 t_{21} & t_{22} & t_{23} & t_{24} & t_{25} & t_{26} & t_{27} \\
 t_{28} & t_{29} & t_{30} & t_{31} & t_{32} & t_{33} & t_{34} \\
 t_{35} & t_{36} & t_{37} & t_{38} & t_{39} & t_{40} & t_{41} \\
 t_{42} & t_{43} & t_{44} & t_{45} & t_{46} & t_{47} & t_{48} \\
\end{array}
\right|=\left| 
\begin{array}{}
 0 & 1 & 1 & 0 & 1 & 0 & 0 \\
 1 & 1 & 0 & 0 & 1 & 0 & 1 \\
 1 & 0 & 1 & 0 & 0 & 1 & 0 \\
 1 & 1 & 0 & 0 & 1 & 1 & 0 \\
 1 & 0 & 0 & 1 & 1 & 0 & 0 \\
 1 & 0 & 1 & 1 & 0 & 0 & 1 \\
 1 & 0 & 1 & 0 & 0 & 1 & 0 \\
\end{array}
\right|=0.$$
Question: For which $n$ does $\mathcal D_n\ne0$ hold?
Using a brute-force computer search I found only $5$ cases: $\mathcal D_2 = -1,\,$ $\mathcal D_{11} = 9,\,$ $\mathcal D_{13} = -9,\,$ $\mathcal D_{19} = 270,\,$ $\mathcal D_{23} = -900,$ and no other cases for $n\le1940$. Are there any other cases except these five?
 [/INST] not an answer just the result of a computation. The following plot shows for each $n$ the minimal number $k$ such that the first $k$ rows are linearly dependent. The question is to find all $n$ such that $k=n+1$.

</s>