0

If you remove the last digit of a square number (for example $15^2=(22)5,13^2=(16)9$), why is it that when that number is odd ($16^2=(25)6$) then the final digit is always 6?

I'm aware that due to this there's only a limited number of final digits. But why does only the squares of 4 and 6 have an odd "prefix"

I assume it has something to do with the fact that the single digit squares only 4 and 6 have an odd prefix

1 01
2 04
3 09
4 16 -> odd
5 25
6 36 -> odd
7 49
8 64
9 81 

But I don't see the connection.

1 Answers1

1

For any real number $~r~$, let $\lfloor r\rfloor$ denote the largest integer $~\leq r$.

For $a \in \Bbb{Z^+}, b \in \{0,1,2,\cdots,9\}$, I claim that

$$\left\lfloor\frac{(10a + b)^2}{10}\right\rfloor$$

is odd if and only if

$$\left\lfloor \frac{b^2}{10}\right\rfloor$$

is odd.

Proof

$$\left\lfloor\frac{(10a + b)^2}{10}\right\rfloor $$

$$= \left\lfloor\frac{(100a^2 + 20ab + b^2}{10}\right\rfloor \tag1 $$

$$ = 10a^2 + 2ab + \left\lfloor \frac{b^2}{10}\right\rfloor. \tag2 $$

The expressions in (1) and (2) above are equivalent because of the following principle:

if $P \in \Bbb{Z}$ and $r \in \Bbb{R}$, then

$$\left\lfloor P + r\right\rfloor = P + \lfloor r \rfloor.$$

Further, in (2) above, each of the first two terms is an even number. Therefore, the overall sum will be an even number if and only if the 3rd term is even.


With the claim established, the remainder of the answer to the posted question is supplied by the analysis already given by the OP (i.e. original poster).

That is, the OP has shown that for $b \in \{0,1,\cdots,9\}$, the only instances when

$$\left\lfloor \frac{b^2}{10}\right\rfloor$$

is odd are when $b \in \{4,6\}.$ Further, these are (also) the only instances where the rightmost (i.e. one's) digit of $b^2$ is $(6)$.

user2661923
  • 35,619
  • 3
  • 17
  • 39