Proof for $\forall x\in \mathbb{Z}^+, \exists t \in \mathbb{Z}, 5 \nmid x \to ((x^2= 5t + 1) \vee (x^2 = 5t – 1))$ I am trying to write a proof for the following: If $x$ is a positive integer that is not divisible by $5$, then $x^2$ can be written either as $x^2 = 5t+1$ or $x^2 = 5t−1$ for some integer $t$. So far, I have managed to get that if $x$ is not divisible by $5$, then it is one of the following cases, where $n$ represents a positive integer: 
\begin{align*}
x & = 5n + 1\\
x & = 5n + 2\\
x & = 5n + 3\\
x & = 5n + 4
\end{align*}
I have tried substituting for $x$, but with two different variables $n$ and $t$ and everything, I'm not sure how I would prove they can be equal. Any help would be much appreciated. Thank you!

If $x = 5n-1$, then
$$x^2 = (5n-1)(5n-1) = 5n(5n-1) - (5n-1) = 5n(5n-1) - 5n+1 $$ 
When you divide $x^2$ by $5$, the first two terms above has no remainders, and therefore, $x^2$ modulo $5$ is $1$. (note: $t$ in this case would be equal to $n(5n-1)-n$)
If $x = 5n-2$, then
$$x^2 = (5n-2)(5n-2) = 5n(5n-2) - 2(5n-2) = 5n(5n-2) - 2\cdot 5n + 2\cdot 2 $$ 
When you divide $x^2$ by $5$, the first two terms above has no remainders, and therefore, $x^2$ modulo $5$ is $-1$.
Similar calculations would show the required result.
