Oh hells bells, I missed the deadline for submitting a solution to Monday Math Madness #5. I solved it and forgot about it until it was too late. The problem reads:
Aside from 1 and 9, are there any perfect squares whose digits are all odd? Justify your answer.
Since I missed the deadline, I guess it’s safe to post my solution… under the cut.
Starting the problem, I wrote down the first bunch of square numbers, and I noticed that in the last two digits (the ones place or the tens place), there was always at least at least one digit which was even. So I figured if I could prove that one of the last two digits is always even in every perfect squares (except 1 and 9), we’re set.
To analyze the last two digits, we have to consider the square of a number . To do this, we break into its smaller parts: where and are digits from 0 to 9. Similarly, can be any positive integer.
- To be clear, to write the number 23421, we see , and . The z is the “ones” place and the y is the “tens” place.
Now let’s look at . Expanding, we get .
Clearly the only terms which contribute to the last two digits are .
This becomes a problem of testing all possibilities for and since each must be one of the digits from 0 to 9. So we simply make a chart!
I used excel, had each cell calculate mod 100, so we could see only the last two digits. And again, as a reminder to make reading the chart easier: the z is the “ones” place and the y is the “tens” place.
Clearly we see that all possible last two digits have an even digit in it. The two exceptions are “01” and “09”. If or , we get a perfect square which is composed of all odd digits. They are the trivial cases. But if there is a hundreds digit, then we have an even digit in these numbers (e.g. 201 or 509… the even digit is “0”). Q.E.D.
This chart, in essence, goes through and shows the last two digits of every perfect square! And we can see that except for 1 and 9, all perfect squares have an even number in the last two digits!
This is pretty brute force. I bet there’s some elegant number theory method to solving this, but I’m not up to snuff. I forgot all my number theory, remember?