# Proof that the square of an odd number is of the form $8m+1$ for some integer $m$

Show that $n$ is odd $\rightarrow \exists m \in \mathbb Z,n^2 = 8m + 1$

Let $k$ be an integer so that $n = 2k+1$. Then $n^2 = (2k+1)^2 = 4k^2 + 4k + 1 = 2\left(2k^2+2k\right) + 1$.

But this isn't equal to $8m+1$, so can I change that into $4(2m)+1$?

• Hint: What happens if $k$ is even? What happens if $k$ is odd. Oct 1, 2017 at 21:40
• Another strategy is: n = 4a+b, where b is +-1. Then n^2 = 16a^2+8ab+b^2. Since b^2 = 1, you can set m = 2a^2+ab, and n^2 = 8m+1. Oct 2, 2017 at 1:14

$$n^2 = (2k+1)^2 = 4k^2+4k+1 = 4k(k+1)+1$$
At least one of $k$ and $k+1$ is divisible by $2$, so let $k(k+1)=2m$. Then, $n^2 = 4(2m)+1 = 8m+1$.
Okay, we want $4k^2 + 4k + 1 = 8m + 1$ so we want $m = \frac {4k^2 + 4k}8=\frac {k^2+k}2$
So w have to prove that $k^2 + k$ is even. Can you do that.