Maths Olympiad Prep

Library / /1 of 14

, 2022

Number theory Difficulty 6.9 National olympiad Prove it Balkan Mathematical Olympiad

Let nn be a positive integer. What is the smallest sum of digits of 5n+6n+2022n5^n + 6^n + 2022^n?

Solutions — 2

Solution 1

We will prove that the smallest sum is equal to 88. One case when it is achieved is for n=1n = 1.

Suppose that for some n>1n > 1 it is possible to obtain a smaller sum than 88. Observing the last digit of the number 5n+6n+2022n5^n + 6^n + 2022^n, we can easily conclude that
5n+6n+2022n{7(mod10),if n0(mod4)3(mod10),if n1(mod4)5(mod10),if n2(mod4)9(mod10),if n3(mod4) 5^n + 6^n + 2022^n \equiv \begin{cases} 7 \pmod{10}, & \text{if } n \equiv 0 \pmod{4} \\ 3 \pmod{10}, & \text{if } n \equiv 1 \pmod{4} \\ 5 \pmod{10}, & \text{if } n \equiv 2 \pmod{4} \\ 9 \pmod{10}, & \text{if } n \equiv 3 \pmod{4} \end{cases}
It follows that n1,2(mod4)n \equiv 1, 2 \pmod{4}. We now consider these two cases.

Case 1: If n=4k+1n = 4k + 1, then
5n+6n+2022n{5(mod9),if k0(mod3)2(mod9),if k1(mod3)8(mod9),if k2(mod3) 5^n + 6^n + 2022^n \equiv \begin{cases} 5 \pmod{9}, & \text{if } k \equiv 0 \pmod{3} \\ 2 \pmod{9}, & \text{if } k \equiv 1 \pmod{3} \\ 8 \pmod{9}, & \text{if } k \equiv 2 \pmod{3} \end{cases}
From here, due to the last digit being equal to 33, it is only possible for the sum of the digits to be equal to 55. Since 5n+6n+2022n1(mod4)5^n + 6^n + 2022^n \equiv 1 \pmod{4}, the penultimate digit must be equal to 11, and all other digits (except the first) are equal to 00. So the last digits of 5n+6n+2022n5^n + 6^n + 2022^n are 00130013 and therefore 5n+6n+2022n13(mod16)5^n + 6^n + 2022^n \equiv 13 \pmod{16}. On the other hand, since n>1n > 1 and n1(mod4)n \equiv 1 \pmod{4} we have 5n+6n+2022n554k5(mod16)5^n + 6^n + 2022^n \equiv 5 \cdot 5^{4k} \equiv 5 \pmod{16}, a contradiction.

Case 2: If n=4k+2n = 4k + 2, then
5n+6n+2022n{7(mod9),if k0(mod3)1(mod9),if k1(mod3)4(mod9),if k2(mod3) 5^n + 6^n + 2022^n \equiv \begin{cases} 7 \pmod{9}, & \text{if } k \equiv 0 \pmod{3} \\ 1 \pmod{9}, & \text{if } k \equiv 1 \pmod{3} \\ 4 \pmod{9}, & \text{if } k \equiv 2 \pmod{3} \end{cases}
Due to the last digit, the only possibility is k0(mod3)k \equiv 0 \pmod{3} so n=12s+2n = 12s + 2 for some sN0s \in \mathbb{N}_0. Now the sum of the digits is 77, and the last digit is 55. Let's use the divisibility criterion with 3737. (A number when divided by 3737 gives the same remainder as the sum of its three-digit blocks that are formed from right to left.) Since 6n+5n+2022n6^n + 5^n + 2022^n must be equal to one of 200520\cdots05 or 100100510\cdots010\cdots05, according to the above criterion 6n+5n+2022n205,25,7,115,106,16(mod37)6^n+5^n+2022^n \equiv 205, 25, 7, 115, 106, 16 \pmod{37}. I.e. congruent to 20,25,7,4,32,16(mod37)20, 25, 7, 4, 32, 16 \pmod{37}.

On the other hand, since it is easy to check that 6121(mod37)6^{12} \equiv 1 \pmod{37}, 51210(mod37)5^{12} \equiv 10 \pmod{37} and 202212241210(mod37)2022^{12} \equiv 24^{12} \equiv 10 \pmod{37} we have that
5n+6n+2022n25102+36+24210236+910s{8(mod37),if s0(mod3)15(mod37),if s1(mod3)11(mod37),if s2(mod3) 5^n + 6^n + 2022^n \equiv 25 \cdot 10^2 + 36 + 24^2 \cdot 10^2 \equiv 36 + 9 \cdot 10^s \equiv \begin{cases} 8 \pmod{37}, & \text{if } s \equiv 0 \pmod{3} \\ 15 \pmod{37}, & \text{if } s \equiv 1 \pmod{3} \\ 11 \pmod{37}, & \text{if } s \equiv 2 \pmod{3} \end{cases}
This is a contradiction.

Solution 2

Let An=5n+6n+2022nA_n = 5^n + 6^n + 2022^n. We have An1(mod4)A_n \equiv 1 \pmod{4}. For n1,2,,5(mod5)n \equiv 1, 2, \dots, 5 \pmod{5} we have 6n6,11,16,21,1(mod25)6^n \equiv 6, 11, 16, 21, 1 \pmod{25} and for n1,2,,20(mod20)n \equiv 1, 2, \dots, 20 \pmod{20} we have
2022n3,9,2,6,7,4,13,11,17,1,3,9,2,6,7,4,13,11,17,1(mod25) 2022^n \equiv -3, 9, -2, 6, 7, 4, 13, 11, 17, -1, 3, -9, 2, -6, -7, -4, -13, -11, -17, 1 \pmod{25}
Thus for n>1n > 1 and n1,2,,20(mod20)n \equiv 1, 2, \dots, 20 \pmod{20} we have
An3,20,14,27,8,10,24,27,38,0,9,2,18,15,6,2,2,5,4,2(mod25) A_n \equiv 3, 20, 14, 27, 8, 10, 24, 27, 38, 0, 9, 2, 18, 15, -6, 2, -2, 5, 4, 2 \pmod{25}
So for n>1n > 1 and n1,2,,20(mod20)n \equiv 1, 2, \dots, 20 \pmod{20} we have
An53,45,89,77,33,85,49,77,13,25,9,77,93,65,69,77,73,5,29,77(mod100) A_n \equiv 53, 45, 89, 77, 33, 85, 49, 77, 13, 25, 9, 77, 93, 65, 69, 77, 73, 5, 29, 77 \pmod{100}
The only possibilities for the sum of the digits of AnA_n to be less than 88 are n5,9,18(mod20)n \equiv 5, 9, 18 \pmod{20} where the last two digits of AnA_n are 33,13,0533, 13, 05 respectively. (The case n10(mod20)n \equiv 10 \pmod{20} is rejected since then we must have An=25A_n = 25 which is impossible.)

Now for n>1n > 1 and n1,2,,6(mod6)n \equiv 1, 2, \dots, 6 \pmod{6} we have An5,7,8,4,2,1(mod9)A_n \equiv 5, 7, 8, 4, 2, 1 \pmod{9}. Looking modulo 6060, the only possibilities are n5,9,18,25,29,38,45,49,58(mod60)n \equiv 5, 9, 18, 25, 29, 38, 45, 49, 58 \pmod{60} and in those cases the last two digits of AnA_n are 33,13,05,33,13,05,33,13,0533, 13, 05, 33, 13, 05, 33, 13, 05 respectively and the sum of digits of AnA_n are 2,8,1,5,2,7,8,5,42, 8, 1, 5, 2, 7, 8, 5, 4 (mod9)\pmod{9} respectively.

So the only possibilities are n38,49(mod60)n \equiv 38, 49 \pmod{60} where the last two digits of AnA_n are 0505 and 1313 respectively, and the sum of digits of AnA_n are 77 and 55 respectively.

The only possibilities are therefore for AnA_n to be equal to a number of the form 200520\dots05 or 100100510\dots010\dots05 or 1001310\dots013. In particular, using the alternating sum of digits criterion for divisibility by 1111 we have that the first number is congruent to 3,7(mod11)3, 7 \pmod{11}, the second congruent to 3,5,7(mod11)3, 5, 7 \pmod{11} and the third congruent to 1,3(mod11)1, 3 \pmod{11}.

We now look at An(mod11)A_n \pmod{11}. It can be easily checked that for n8(mod10)n \equiv 8 \pmod{10} we have
An4+4+30(mod11) A_n \equiv 4 + 4 + 3 \equiv 0 \pmod{11}
and for n9(mod10)n \equiv 9 \pmod{10} we have
An9+2+55(mod11) A_n \equiv 9 + 2 + 5 \equiv 5 \pmod{11}
So all three cases lead to a contradiction.

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.