Maths Olympiad Prep

Library / /27 of 42

Number theory Difficulty 6.0 National olympiad Prove it Ireland

For any positive integer NN we denote by {N}\overline\{N\} the number obtained by writing the digits of NN from right to left. For instance, if N=2395N = 2395 then {N}=5932\overline\{N\} = 5932 and if N=3780N = 3780 then {N}=873\overline\{N\} = 873.
Find all positive integers NN such that N{N}=9N - \overline\{N\} = 9.

Solution

If NN has one digit this is not possible. If NN has two digits, say N=abN = ab, then {N}=ba\overline\{N\} = ba so that N{N}=9(ab)N - \overline\{N\} = 9(a - b) which yields ab=1a - b = 1 so the numbers are
N=10,21,32,43,54,65,76,87,98. N = 10, 21, 32, 43, 54, 65, 76, 87, 98.
Assume there are numbers NN with the above property that have m3m \ge 3 digits. Thus, we may write
N=aZb N = aZb
where a{1,2,3,,9}a \in \{1, 2, 3, \dots, 9\} and b{0,1,2,3,,9}b \in \{0, 1, 2, 3, \dots, 9\} are digits and ZZ is a positive integer with m21m - 2 \ge 1 digits. We may need to include leading zeros in the presentation of ZZ. Then, {N}=b{Z}a\overline\{N\} = b\overline\{Z\}a, where {Z}\overline\{Z\} is obtained by writing the digits of ZZ from right to left. We now have
9=N{N}=(10m1a+10Z+b)(10m1b+10{Z}+a) 9 = N - \overline\{N\} = (10^{m-1}a + 10Z + b) - (10^{m-1}b + 10\overline\{Z\} + a)
which yields
9=(10m11)(ab)+10(Z{Z}).(6) 9 = (10^{m-1} - 1)(a - b) + 10(Z - \overline\{Z\}). \quad (6)
Because N{N}N \ge \overline\{N\}, we must have aba \ge b.
If ab=0a - b = 0 then (6) cannot hold because the right-hand side is a multiple of 10 while the left-hand side is not. If ab2a - b \ge 2 we again raise a contradiction since Na10m1N \ge a \cdot 10^{m-1} and {N}(b+1)10m1\overline\{N\} \le (b + 1) \cdot 10^{m-1} imply
9=N{N}(ab1)10m110m1100. 9 = N - \overline\{N\} \ge (a - b - 1) \cdot 10^{m-1} \ge 10^{m-1} \ge 100.
Hence ab=1a - b = 1 and from (6) we find 9=10m11+10(Z{Z})9 = 10^{m-1} - 1 + 10(Z - \overline\{Z\}) from which we get
{Z}Z=10m21.(7) \overline\{Z\} - Z = 10^{m-2} - 1. \quad (7)
Clearly, Z=0Z = 0 does not satisfy (7). If Z>0Z > 0, (7) implies {Z}>10m21\overline\{Z\} > 10^{m-2} - 1. Recall now that ZZ and {Z}\overline\{Z\} have at most m2m - 2 digits, fewer than m2m - 2 if ZZ contains leading digits equal to zero. Hence, ZZ and {Z}\overline\{Z\} cannot exceed 10m21=999910^{m-2} - 1 = 999\dots9, the number that consists of m2m - 2 digits 9. This contradiction shows that when m3m \ge 3 there is no solution.
Hence, the only numbers satisfying the condition in the problem are the two-digit numbers listed above.

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 and solution reproduced as published; topic and difficulty added by this site.