Browse · MathNet
Print62nd Czech and Slovak Mathematical Olympiad
Czech Republic counting and probability
Problem
Let denote the number of all -digit positive integers containing only the digits , , , , and such that every two adjacent digits differ by at least . Prove that for every positive integer ,
Solution
Cutting off the last digit of a satisfactory -digit integer yields a satisfactory -digit integer. Notice how a satisfactory -digit integer can be constructed from a satisfactory -digit integer. If the last digit of the integer is , we can append any of the digits , , . If the last digit is , we can append or ; if it is , or can be appended; if it is , or can be appended; and, finally, in the case of , we can append any of the digits , , . Thus we can see that only the last digit matters. So now, let denote the number of satisfactory -digit integers ending in or ; similarly for or , and for integers ending in . Then . Apparently, , , , , , , . The above reasoning implies the recurrent formulae Hence it follows that , , , . Using mathematical induction, we prove that for every , it holds that It indeed does for . If , and , then also It follows from the proved inequalities that
The latter inequality can be proved analogously; we will verify that for , where is a suitably chosen number. Then we will have Therefore, setting , we get for every . It remains to prove, by mathematical induction, the inequalities (2) where . They hold for . If (2) holds, we also have
---
Alternative solution.
We will show that each of the sequences , , defined in the above solution satisfies (as a consequence of the equalities (1)) the recurrent equation , and so this equation is satisfied by the sequence in question, which we will denote by (3). Indeed, the first and third equalities of (1) give , whence Considering the second equality in (1), we thus get Confronting the marginal expressions leads to the mentioned equality Triple substitution of into the equality yields which can be rearranged to Finally, the sequence is merely a shifted sequence , so Combining all of the three recurrent formulae, we get
Using mathematical induction, we will prove that for every , The inequalities (4) hold for both and . If (4) holds for all , then Similarly, The equalities and the inequalities of (4) imply that the inequality holds for every positive integer .
The latter inequality can be proved analogously; we will verify that for , where is a suitably chosen number. Then we will have Therefore, setting , we get for every . It remains to prove, by mathematical induction, the inequalities (2) where . They hold for . If (2) holds, we also have
---
Alternative solution.
We will show that each of the sequences , , defined in the above solution satisfies (as a consequence of the equalities (1)) the recurrent equation , and so this equation is satisfied by the sequence in question, which we will denote by (3). Indeed, the first and third equalities of (1) give , whence Considering the second equality in (1), we thus get Confronting the marginal expressions leads to the mentioned equality Triple substitution of into the equality yields which can be rearranged to Finally, the sequence is merely a shifted sequence , so Combining all of the three recurrent formulae, we get
Using mathematical induction, we will prove that for every , The inequalities (4) hold for both and . If (4) holds for all , then Similarly, The equalities and the inequalities of (4) imply that the inequality holds for every positive integer .
Techniques
Recursion, bijectionInduction / smoothingRecurrence relations