Direct proof that if $n^2$ is odd, $n$ is odd

elementary-number-theoryproof-writingsolution-verification

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.

Best Answer

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.

Related Question