5

So this girl tells me "Did you know that if $n$ is odd, then $n^2=8k+1$ for some $k\in \mathbb{Z}$?" And so I was like, "Really?" She said, "Yeah!" So I wrote this down:


If $n$ is odd, then $n=2m+1$, and so by squaring $n$ we get $$n^2=(2m+1)^2=8(\frac{1}{2}m^2+\frac{1}{4}m)+1,$$ which means that for any $m$ of the form $m=4t$ for some $t\in \mathbb{Z}$ we get that $$8(\frac{1}{2}m^2+\frac{1}{4}m)+1=8(\frac{1}{2}(4t)^2+\frac{1}{4}(4t))+1=8(8t^2+t)+1,$$ so for any value of $t$ we can find a value $m$ which makes $$8(\frac{1}{2}m^2+\frac{1}{4}m)+1=n^2,$$ for some $n$ that is odd, as desired.


My question here is, is this a good approach to proving what the girl said?

Thomas Andrews
  • 177,126

2 Answers2

7

An equivalent claim is that in the ring of integers modulo $8$, $n^2=1$ if $n$ is odd. There are only four odd $n$ to check: $1$, $3$, $-3,$ and $-1$. We verify $(\pm1)^2=1$ and $(\pm3)^2=9=1$, and we're done!

Chris Culter
  • 26,806
4

The problem is that your proof doesn't handle the case when $m$ is not a multiple of $4$ - but the claim is still true then (e.g. $n = 5$, so that $m = 2$).

A much easier way to proceed is as follows: If $n$ is odd, then $n$ leaves a remainder of either $1$ or $3$ upon division by $4$. If the remainder is $1$, we find $n = 4m + 1$, giving

$$n^2 = 16 m^2 + 16 m + 1 = 8(2m^2 + 2m ) + 1$$

On the other hand, if the remainder is $3$ and $n = 4m + 3$, we get

$$n^2 = 16 m^2 + 24 m + 9 = 8 (2m^2 + 3m + 1) + 1$$

as desired.


Alternatively, if $n = 2m + 1$, then

$$n^2 = 4m^2 + 4m + 1 = 4(m^2 + m) + 1$$

But $m^2 + m$ is always even, regardless of $m$; hence, $m^2 + m = 2k$ for some $k$ and $n^2 = 8k + 1$.