For each integer we define to be the number obtained from by moving the two leading digits to the end. For example, and . Find all integers for which:
Solutions — 2
Solution 1
The general solution is
for any positive integer . In other words, the number consists of replicates of the digits 109890.
Let be the number of digits of so when . Dividing by , let be the quotient and the remainder. This splits the digits of into the first two and the remaining digits,
where and . Rearranging the digits we have:
The equation is equivalent to which we write in terms of and :
or
We know that . We now claim that for any solution. For a contradiction, suppose that . Then equation (7) implies that
Comparing the left and right end gives , contradicting . Therefore . Substituting into equation (7) gives
As then 91 must divide . This is not only necessary but also sufficient, as we can then write:
and is then an integer that lies in the feasible range.
It remains then to find the values of for which is a multiple of 91. Equivalently, we require that , is a multiple of 91. As we can use a short cut to check that is a multiple both of 7 and of 13. Remainders tabulated below:
| m | (mod 7) | (mod 13) | (mod 91) |
|---|---|---|---|
| 0 | 1 | 1 | 1 |
| 1 | 3 | 10 | 10 |
| 2 | 2 | 9 | 9 |
| 3 | 6 | 12 | 90 |
| 4 | 4 | 3 | 81 |
| 5 | 5 | 4 | 82 |
| 6 | 1 | 1 | 1 |
The pattern continues with period 6. Therefore, must be a multiple of 6, and, as we have for some positive integer .
Reconstructing the pieces and using equation (8) we have:
We can write the digits explicitly, noting that:
As the stated representation follows.
Solution 2
The equation could also be written as .
As and have the same number of digits, the leading digit of must be equal to 1 and the leading digit of , which is the third digit from the left of , has then to be equal to 9. This implies that there occurs a carry from the third to the second place from the left, hence the second digit of must be zero. The shapes of and are therefore
where each star stands for a digit and the dots indicate that the number of digits of is currently unknown. We can now work our way backwards from to , starting at the end. The key feature we are using here is that .
Let the rightmost unknown digit be equal to so that we have
then , hence . This gives us
We will again call the rightmost unknown digit so that we have
and , hence . We now need to check if this digit could already be the third digit from the left, i.e. . But . This gives us, with new ,
and, keeping the carry in mind, . Therefore, and
with , which implies . We have to check again if this digit could already be the third digit from the left, i.e. . Indeed, we now have .
So far we have shown that is one solution and that the last six digits of for any solution need to be . This implies that the last six digits of any solution are equal to .
We could now continue in the manner above to see that this sequence of digits must repeat if has more than six digits. Alternatively, we could argue as follows.
Let be the number obtained from by removing the last six digits. We show that . Clearly, agrees, except possible at the last two digits, with the number obtained from by removing the last six digits. As we have seen above, the two leading digits of , and so also of , are 10. As the last six digits of are 109890, the last two digits of are 10. Hence, . Using it follows now that . It follows by induction that has digits () and consists of consecutive blocks of six digits, all equal to 109890.