A mathematical curiosity that I have been thinking about.

You have probably noticed that 12**²**, in base 10, is 144. (Actually the square of the number 12 in any base from 5 upwards is always 144 in that base, for fairly obvious reasons.) You might not have noticed that 38**²**, in base 10, is 1,444. I did notice this and wondered if it’s possible to find squares with ever increasing numbers of 4’s at the end.

The short answer is no. The long answer is that, apart from the obvious case of square numbers ending in 0, if you are sticking to base 10 the most repeated digits you can have at the end is three 4’s, as in 38**²**. All square numbers in base 10 ending in 1 have an even number in the tens column. (01, 81, 121, 361…) All square numbers in base 10 ending in 9 have an even number in the tens column. (09, 49, 169, 289…) All square numbers in base 10 ending in 5 have a 2 in the tens column. (25, 225, 625…)

All square numbers in base 10 ending in 4, however do have an even number in the tens column (04, 64, 144, 324…) so one in five of them will have two 4’s at the end. Square numbers in base 10 ending in …44 can have either an odd or an even number in the hundreds column, and it’s not much work to show that any number in base 10 of the form 500n ± 38 (where n is an integer) will have a square that ends in …444. However that is the end of the story, as the number in the thousands column will always be odd: 38**²** = 1,444; 462**²** = 213,444; 538**²** = 289,444; 962**²** = 925,444 and so on.

That’s in base 10. Other bases are a different matter. (Though again, in every case, you can always get square numbers which end in increasing 0’s.) In base 2, all odd squares end in ..001, so there is no chance of repeated digits at the end other than 0. In base 4, all odd squares end either in …01 or …21.

For odd numbers, however, there seems to be no limit. In base 3, for instance, the number 121 (base 10) the square of 11 (base 10) is 11,111 in base 3 (81+27+9+3+1). In base 5 and above, square numbers that end in 1 can be multiplied by 4 to get more square numbers that end in 4.

And larger even numbers may offer more flexibility too. In base 16 (hexadecimal), the square of 497 (1175 in base 10) is 15,111 (1,380,625 in base 10); the square of DC5 (3,525 in base 10) is BD9,999 (12,425,625 in base 10).

Anyway, that’s as far as I have got for now.