Is it possible to construct a matrix : $A^2 = J_{n}$. Consider $\Omega = Mat_{n\times n}(\{0,1\})$ - space of matrices of $1$s and $0$s.  We want to determine does there exist $A\in\Omega$ : $A^2 = J_n$, where $J_n$ is a matrix of ones. We suppose that there are standard arithmetical operations : ($\mathbb{R}$,+,$\cdot)$.
Actually I don't understand how to step it. I've thought about using some properties about spectrum of $J_n$, but it looks like failure moment.
 A: Note that $spectrum(J_n)=\{0,\cdot,0,n\}$; consequently, $spectrum(A)=\{0,\cdots,0,\pm\sqrt{n}\}$ and, necessarily,  $trace(A)=\sqrt{n}$. Thus, $A$ may exist only when $n$ is a square. In this last case, $A$ exists
For $n=1$, $A=[1]$.
For $n=4$,

For $n=9$,

and so on...
A: If $n$ is a square (such as 4 in the example below), then the following pattern seems to work
$$
\begin{bmatrix}
1& 1& 0& 0 \\
0& 0 & 1&1 \\
1&1 &0 &0 \\
0&0 &1 &1 
\end{bmatrix}
$$
+ many row-column permutations.
A: The answer is negative when $ n = 2 $.  There, one finds by direct computation that the only matrices $ A $ which satisfy $ A^2 = J_2 $ are $ \pm \cfrac{\sqrt{2}}{2} J_2 $, which does not belong to the desired space.  
A: Consider:
$(J_n)_{ij} = \sum_{k = 0}^{n} A_{ik} \cdot A_{kj}$
(By the way: Do(es a) row / column permutation(s) of $A$ change the result?)
Using the formula above and that the entries of $A$ are 0 or 1, it is clear that $(J_n)_{ii} = 1$ as requested if and only if there is (for every tuple $(i, j)$) exactly one k such that $a_{ik}$ and $a_{ki}$ = 1.
How does $A$ then look like? Try now a proof by contradiction.
