Find all six-digit numbers with the following properties:
* the number formed by the last three digits of is exactly 4 greater than the number formed by the first three digits of ;
* is the square of an integer.
Solution
Let be the number formed from the first three digits of . Then is equal to which should be the square of an integer . The equation can be written as . Since , we have and so is determined by its remainder on division by , which, by the Chinese Remainder Theorem, is determined by the three remainders , and .
From the equation above we see that , and . To find the eight possibilities for corresponding to the different choices of signs, we first complete the table
| y (mod 7) | y (mod 11) | y (mod 13) | y (mod 1001) |
|---|---|---|---|
| 2 | 2 | 2 | 2 |
| 2 | 2 | -2 | 310 |
| 2 | -2 | 2 | 548 |
| 2 | -2 | -2 | 856 |
and then multiply each line by and replace negative residues modulo 1001 by their corresponding smallest non-negative remainder.
Here is how the numbers in the fourth column of the table can be obtained. First we find numbers and such that
To do so, we just have to solve congruences like . The solutions of smallest absolute value are , and . If the numbers in the first three columns of our table are , then the number in the fourth column is congruent to . For the first two rows, we obtain the numbers given in the table whereas for rows three and four we first get and , respectively, and then have to add 2002. The remaining four solutions are
Because and is a six-digit number, we can rule out that is one of the numbers 2, 145 or 310 as the squares of these numbers have less than six digits. When we get and this does not give a solution to the problem. This leaves us with four solutions:
which clearly satisfy the requirements of the problem.
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.