Marq's Website

Math

The Second to Last Digit of Squares

In all squares of odd numbers, is the second-to-last digit never odd?

Yes.

Is this by chance or is there a good reason for it?

Any odd number can be expressed as 10a + 2b + 1,

(10a + 2b + 1)2
= 100a2 + 20ab + 10a + 20ab + 4b2 + 2b + 10a + 2b + 1
= 100a2 + 40ab + 20a + 4b2 + 4b + 1

100a2 + 40ab + 20a always has an even second-to-last digit and a zero last digit, therefore 100a2 + 40ab + 20a + 4b2 + 4b + 1 has an even second-to-last digit if 4b2 + 4b + 1 has an even second-to-last digit.

Since for all possible values of b there is an even second-to-last digit, for all odd numbers, the square has an even second-to-last digit in base 10.

And in other bases is it the same?

Any odd number in an even base can be expressed as ca + 2b + 1,

(ca + 2b + 1)2
= c2a2 + 2cab + ca + 2cab + 4b2 + 2b + ca + 2b + 1
= c2a2 + 4cab + 2ca + 4b2 + 4b + 1

c2a2 + 4cab + 2ca always has an even second-to-last digit and a zero last digit, therefore c2a2 + 4cab + 2ca + 4b2 + 4b + 1 has an even second-to-last digit if 4b2 + 4b + 1 has an even second-to-last digit.

If c = 2 then

If c = 4 then

If c = 6 then

If c = 8 then

If c=12 then

And so on…

Since for all possible values of b in bases 2, 4, and 12 there is an even second-to-last digit, for all odd numbers in these bases, the square has an even second-to-last digit in these bases.

Thus, the answer to the third question is "It is the same in some, but not all".

If so, in which ones?

From the answers to the first and third questions we see that it is the same for bases 2, 4, 10, and 12, and not for bases 6 and 8.

In base 3, 3102 = 12113 = 145 = 127 = 109 = 2311

Therefore, it is not the same in bases 3, 5, 7, 9, and 11.

Consider that ( x + 2 )2 < 2x2 for x = 5

(x + 2)2 < 2x2
(x + 2)2 + 2x < 2x2 + 3x + 2
(x + 2)2 + 2x + 5 < 2x2 + 3x + 2 + x
x2 + 4x + 4 + 2x + 5 < 2x2 + 4x + 2
x2 + 6x + 9 < 2(x2 + 2x + 1)
(x + 3)2 < 2(x + 1)2
[(x + 1) + 2]2 < 2(x + 1)2

Thus, for all odd whole numbers x equals 5 or greater, the square of the next odd number is less than half the square of the current odd number. This means that if there is no second-to-last digit in a square of an odd number, then the second-to-last digit of the square of the next odd number can be no larger than 1 in any base greater than 12.

Therefore, bases 2, 4, 10, and 12 are the only bases for which the squares of odd numbers always have an even second-to-last digit.

Q. E. D.

Back

(========)

Valid XHTML 1.0 StrictValid CSS!

Last Updated: 2009-05-02