Why any square can be written in this form? I have noticed that all squares, at least up to $19 ^ 2$ can be written as: $a^2 = 5k + p$, where $a \in \mathbb{Z}+\neq 1$ and $k  \in \mathbb{Z}+$ and $p = \{0,\pm1\}$
Some examples:
$4^2 = 5 \cdot 3 + 1$
$13^2 = 5 \cdot 34 - 1 $
What is the intuitive and formal proof to see this?

Say we want to consider $b^2$.  We look at $b$ modulo $5$, $b = 5c+d$, where $c$ is an integer and $d$ is one of $0$, $1$, $2$, $3$, or $4$.  Then 
$$  b^2 = (5c+d)^2 = 25c^2 + 10c d + d^2  \text{.}  $$
The part "$25 c^2 + 10 c d$" is a multiple of $5$, so can be collected into $k$.  This leaves $d^2$.  We show in a table that $d^2$ is congruent to $0$ or $\pm 1$ modulo $5$ for each choice of $d$.  \begin{align*}
&d & &d^2  \\
&0 & &0  \\
&1 & &1  \\
&2 & &4  \cong -1 \pmod{5}  \\
&3 & &9  \cong -1 \pmod{5}  \\
&4 & &16 \cong 1 \pmod{5}  \text{.}
\end{align*}
In addition to showing that every $b$ squares to a multiple of $5$ or $\pm 1$ from a multiple of $5$, we can read from the table which of these cases occurs  since $d \cong b \pmod{5}$.
