Direct proof that if $n^2$ is odd, $n$ is odd I am rereading a book on methods of proof and thought I would try proving that if $n^2$ is odd, then $n$ is odd. The proofs for this that I have seen online mostly involve a proof by contrapositive. I was wondering if this could be done by direct proof instead. I found a direct proof in Mark Bennet's answer to this question. It goes:

Suppose $n^2$ is odd, then $n^2=2m−1$ and $(n+1)^2=2(m+n)$
Now $2$ is prime and $2∣(n+1)^2$ so $2∣n+1$ therefore $n+1=2r$ (for some integer r) whence $n=2r−1$ and $n$ is odd.

I came up with a separate proof and I was wondering if it is logically sound:

Suppose $n^2$ is odd, then $n^2=2m+1$ for some $m \in \mathbb{Z}$.
$n^2=2m+1 \implies n^2-1 = 2m \implies (n+1)(n-1) = 2m$
This shows $(n+1)(n-1)$ is even; for this to be true, at least one of $n+1$ and $n-1$ must be even, which means that $n$ is odd.

Is this proof written well? Does it have gaps? If there are problems with it, I would like to ensure that I do not make those same mistakes in the future.
 A: Your proof is nice. The problem it has is that when you say "for this to be true", you are hiding the fact that you are assuming one of two things:

*

*the Fundamental Theorem of Arithmetic (to say that $2$ has to be a factor of either $n-1$ or $n+1$), or


*that the product of odd numbers is odd.
The problem with the first one is that the proof of "$n$ even if and only if $n^2$ even" usually appears at the very beginning of Number Theory, before the FTA.
The problem with the second one, is that in the end you are using the kind implication you are trying to avoid by not using the contrapositive.
A: Note that, in your proof, you take for granted that:
$$x\cdot y \text{ is even } \Longrightarrow x \text{ is even or } y \text{ is even}$$
However, if you take this for granted, then the first proof can actually be shortened. From $(n+1)^2=2(m+n)$, you get immediately that $(n+1)^2$ is even, so $n+1$ is even and, therefore, $n$ is odd.
So the first proof is more complete in some sense, as it takes care to prove this little intermediate step.
A: Your proof is all correct except for this one thing when you say that "at least one of $(n-1)$ and $(n+1)$ is even".
Note that you got
$$(n-1)(n+1)=2m$$
Now the left hand side must be even but also observe that it is the product of two numbers in arithmetic progression with common difference $2$ hence if one is even then other automatically becomes even.
Your proof is correct but the word "at least one of them" can lead to a little bit of ambiguity.
