Maths Olympiad Prep

Library / /255 of 462

Number theory Difficulty 5.9 AIME, harder Prove it Ireland

Find all six-digit numbers nn with the following properties:
* the number formed by the last three digits of nn is exactly 4 greater than the number formed by the first three digits of nn;
* nn is the square of an integer.

Solution

Let xx be the number formed from the first three digits of nn. Then nn is equal to 1000x+(x+4)=1001x+41000x + (x + 4) = 1001x + 4 which should be the square y2y^2 of an integer yy. The equation y2=1001x+4y^2 = 1001x + 4 can be written as (y2)(y+2)=71113x(y - 2)(y + 2) = 7 \cdot 11 \cdot 13 \cdot x. Since n<106n < 10^6, we have y<103y < 10^3 and so yy is determined by its remainder on division by 1001=711131001 = 7 \cdot 11 \cdot 13, which, by the Chinese Remainder Theorem, is determined by the three remainders y(mod7)y \pmod{7}, y(mod11)y \pmod{11} and y(mod13)y \pmod{13}.

From the equation above we see that y±2(mod7)y \equiv \pm 2 \pmod{7}, y±2(mod11)y \equiv \pm 2 \pmod{11} and y±2(mod13)y \equiv \pm 2 \pmod{13}. To find the eight possibilities for y(mod1001)y \pmod{1001} corresponding to the different choices of signs, we first complete the table

y (mod 7)y (mod 11)y (mod 13)y (mod 1001)
2222
22-2310
2-22548
2-2-2856

and then multiply each line by 1-1 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 m1,m2m_1, m_2 and m3m_3 such that
l@ 2em l m 1 1 7 11 13 m 1 m 2 1 11 7 13 m 2 m 3 1 13 7 11 m 3.\text{l@ 2em l m 1 1 7 11 13 m 1 m 2 1 11 7 13 m 2 m 3 1 13 7 11 m 3.}
To do so, we just have to solve congruences like 1113k1(mod7)11 \cdot 13 \cdot k \equiv 1 \pmod{7}. The solutions of smallest absolute value are m1=286m_1 = -286, m2=364m_2 = 364 and m3=77m_3 = -77. If the numbers in the first three columns of our table are a1,a2,a3a_1, a_2, a_3, then the number in the fourth column is congruent to a1m1+a2m2+a3m3a_1m_1 + a_2m_2 + a_3m_3. For the first two rows, we obtain the numbers given in the table whereas for rows three and four we first get 1146-1146 and 1454-1454, respectively, and then have to add 2002. The remaining four solutions are
l@ 2em l 999 -2 1001 691 -310 1001 453 -548 1001 145 -856 1001 .\text{l@ 2em l 999 -2 1001 691 -310 1001 453 -548 1001 145 -856 1001 .}
Because y2=ny^2 = n and nn is a six-digit number, we can rule out that yy is one of the numbers 2, 145 or 310 as the squares of these numbers have less than six digits. When y=999y = 999 we get y2=9992=998001y^2 = 999^2 = 998001 and this does not give a solution to the problem. This leaves us with four solutions:
n=4532=205209n=5482=300304n=6912=477481n=8562=732736 \begin{aligned} n &= 453^2 = 205209 \\ n &= 548^2 = 300304 \\ n &= 691^2 = 477481 \\ n &= 856^2 = 732736 \end{aligned}
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.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.