I am still very new to proofs. I am just getting some practice, as I am still struggling with the concepts. Any feedback would be greatly appreciated. Thank you in advance.
Claim: If $n^2-1$ is divisible by $8$, then $n$ is odd.
Proof: Suppose $n$ is even; that is, $n=2k$, for some $k \in \mathbb{Z}$. Then, $n^2-1 = (2k)^2-1$, which is odd. Therefore, $n$ must be odd and thus, contradicts our assumption that $n$ is even.
This is my second practice proof I am working on so please be gentle! I am still learning the logic and working through the proofs slowly. Any feedback, tips, or hints/tricks would be greatly appreciated! Thanks.
As you have used the tag number-theory, solution with modular arithmetic: $n^2-1\equiv 0\pmod{8}$ or, $n^2\equiv 1\pmod{8}$, if $n$ is even then we need to check two cases, $n=2k$, with $(2,k)=1$ and $n=2^t\cdot m$ for $t\ge 2$. If $n=2k$ then, $n^2\equiv 4k^2\equiv 1\pmod{8} $ implies $k^2\equiv 4^{-1}\pmod{8}$, as, $4$ has no inverse $\pmod{8}$, the equation can't be satisfied with any $n=2k$ and for $t\ge 2$,$n=2^t\cdot m,n^2\equiv 0\pmod{8}$. Now, if $n$ is odd, $$n^2\equiv 4p^2+4p+1\equiv 4p(p+1)+1\equiv 1\pmod{8}$$ as $p(p+1)\equiv 0\pmod{2}$ for any $p\in \mathbb{N}$. Hence done. $\boxed{}$