Maths Olympiad Prep

Library / /59 of 69

, 2011

Number theory Difficulty 6.4 National Olympiad Prove it South Africa

a sequence (an)n=1(a_n)_{n=1}^{\infty} of natural numbers has the property that for any n1n \ge 1, an+1=an+bna_{n+1} = a_n + b_n, where bnb_n is the number having the same digits as ana_n, but in the reverse order (unlike ana_n, the number bnb_n may start with one or more zeroes in the decimal notation). For instance, if a1=170a_1 = 170 we have a2=170+71=241a_2 = 170 + 71 = 241, a3=241+142=383a_3 = 241 + 142 = 383, and so on.

a. Can the number a6a_6 be prime?

b. Can the number a7a_7 be prime?

Solution

Let an=an,1an,2an,kna_n = a_{n,1}a_{n,2}\dots a_{n,k_n} be the decimal representation of ana_n. Note that if knk_n is even, then an11an,1an,2+an,kna_n \equiv_{11} a_{n,1} - a_{n,2} + \dots - a_{n,k_n} and bn11an,kan,k1+an,1anb_n \equiv_{11} a_{n,k} - a_{n,k-1} + \dots - a_{n,1} \equiv -a_n. Hence an+1=an+bn110a_{n+1} = a_n + b_n \equiv_{11} 0, so an+1a_{n+1} is divisible by 1111. Also note that if ana_n is divisible by 1111, then bnb_n is also divisible by 1111, and hence an+1a_{n+1} is divisible by 1111. In order to prove that a7a_7 cannot be prime it suffices to prove that one of a1,a2,,a6a_1, a_2, \dots, a_6 has an even number of digits.

For a contradiction, suppose that all six numbers have an odd number of digits. Note that an+1a_{n+1} can have at most one more digit than ana_n, so in fact a1,,a6a_1, \dots, a_6 all have the same number of digits.

Let a1,1=aa_{1,1} = a and a1,k1=da_{1,k_1} = d. Then the first digit of a2a_2 is either a+da+d or a+d+1a+d+1, and since a2a_2 has the same number of digits as a1a_1, a+d<10a+d < 10. Hence the units digit of a2a_2 equals a+da+d.

Thus the first digit of a3a_3 is at least 2(a+d)<102(a+d) < 10, and the final digit of a3a_3 is at least 2(a+d)2(a+d). Continuing in this way, we see that the first digit of a4a_4 is at least 4(a+d)4(a+d), the first digit of a5a_5 is at least 8(a+d)8(a+d) and the first digit of a6a_6 is at least 16(a+b)16(a+b). However, 16(a+d)16(a+d) is certainly not less than 1010, which implies that a6a_6 must have more digits than a1a_1, a contradiction. This shows that a7a_7 must be divisible by 1111, and hence cannot be prime.

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.