Chapter 32
Numbers That Reappear in Their Squares
A three-digit number has this odd habit: the last three digits of its square are the number itself, in the same order. Find it. How many three-digit numbers behave this way?
Solution
There are two: and , since To see why these and no others, we want a three-digit with ending in , that is divisible by . Now and are consecutive, so they share no common factor; whatever powers of and make up the cannot be split between them, so the whole goes into one of the two and the whole into the other. That gives two interesting cases:
divides while divides . So is a multiple of that is one more than a multiple of , and the only such number below is (indeed and ).
divides while divides . So is a multiple of that is one more than a multiple of , which gives (since and ).
The only other possibilities, where divides or outright, give numbers ending in or , not a genuine three-digit answer. So and are the only ones. Such numbers are called automorphic. Pleasingly , and the habit persists into more digits: ends in , and .