Browse · MathNet
PrintInternational Mathematical Olympiad
China number theory
Problem
Find all positive integers such that has a multiple which is alternating.
We call a positive integer alternating if every two consecutive digits in its decimal representation are of different parity.
We call a positive integer alternating if every two consecutive digits in its decimal representation are of different parity.
Solution
Solution I
Lemma 1: If is a positive integer, then there exist such that are odd integers, are even integers, and Proof of Lemma 1 by mathematical induction. If , it follows from that the proposition is true. Assume that if , the proposition is true. When , let by the inductive hypothesis. The problem reduces to proving that there exist with odd and even such that , or , or in view of . It follows from , , and that Lemma 1 is true.
Lemma 2: If is a positive integer, then there exists an alternating number with an even number of digits such that is odd and , where can be 0, but . Proof of Lemma 2 by mathematical induction. If , it follows from that the proposition is true. Assume that if , the proposition is true, or there exists an alternating multiple satisfying . When , let . The problem reduces to proving that there exist with even and odd such that , or . Since is coprime to 25, there exist such that . If is odd, between and , at least one satisfies that the highest-valued digit is even. If is even, between and , at least one satisfies that the highest-valued digit is even. This completes the proof of Lemma 2.
Let , where is coprime to 10 and . Assume that and . Let be an arbitrary multiple of . The last decimal digit is 0, and the digit in tens is even. Hence these do not satisfy the required condition.
① When , consider , , , , , . There must exist two of them congruent modulo . Without loss of generality, we may assume that , and Then Hence because is coprime to 10. Now these positive integers satisfy the required condition.
② When and , it follows from Lemma 1 that there exists an alternating number satisfying . Consider There must exist two of them congruent modulo . Without loss of generality, we may assume that , and Since is coprime to 10, . Moreover, since is coprime to 2, which is alternating.
③ When , it follows from Lemma 2 that there exists an alternating multiple satisfying with odd. Using the same argument as in ②, we obtain that there exist satisfying . Since is coprime to 5, In addition, is alternating, and the last decimal digit is odd.
④ When and , it follows from ③ that there exists an alternating number satisfying that is odd and . Hence , which is alternating.
In conclusion, if is not divisible by 20, then these positive integers satisfy the required condition.
Solution II
should be the positive integers and should satisfy that is not divisible by 20.
(1) Assume that . Select a multiple of arbitrarily. Denote , where . We have . Hence , . This implies that is even. Therefore, is not alternating.
(2) We will prove that if is a positive integer and is not divisible by 20, then must have a multiple which is alternating. We will show three lemmas as follows. Then we divide the proof into four cases.
Lemma 1: If the positive integer is coprime to 10, then for any , there exists such that \frac{\begin{array}{c} 1 \ 00\cdots0 \\ \underline{\quad} \\ \mathbf{number} \ l \ \mathbf{of} \ 0 \end{array} \quad \begin{array}{c} 1 \ 00\cdots0 \\ \underline{\quad} \\ \mathbf{number} \ l \ \mathbf{of} \ 0 \end{array} \quad \begin{array}{c} 1 \cdots 1 \ 00\cdots0 \\ \underline{\quad} \\ \mathbf{number} \ l \ \mathbf{of} \ 0 \end{array} \quad \begin{array}{c} 1 \\ \underline{\quad} \\ \mathbf{total number} \ k \ \mathbf{of} \ 1 \end{array}} is a multiple of . Proof of Lemma 1: Consider the numbers There must exist two of them congruent modulo . Without loss of generality, we may assume that Then . Moreover, since and is coprime to , , and is a positive integer. This completes the proof of Lemma 1.
Lemma 2: For any , there always exists an alternating number with digits such that its first digit can be 0, and its last decimal digit is 5, and . Proof of Lemma 2 by inductive construction. Start with . Suppose that is alternating, where and can be 0. In addition, . Let . Denote Any two of them in are not congruent modulo , and is coprime to . So any two of the numbers in are not congruent modulo . Select such that . Then . Let . Then is an alternating number with digits, where , and its first digit can be 0. In addition, is a multiple of . This completes the proof of Lemma 2.
Lemma 3: For any integer , there always exists an alternating number with digits such that its last decimal digit is 2, and Proof of Lemma 3 by inductive construction. Start with . Suppose that is alternating, where , and . It follows from the property of the alternating numbers that . Denote . Any two of them in are not congruent modulo , and is coprime to . So any two numbers of are not congruent modulo . Now divide the four numbers in by respectively. The original sentence means the 4 numbers are divisible by 8. Since with is odd, the remainders are 1, 3, 5, 7. Let with odd. Select such that . Then . Let . Then is alternating with digits. In addition, and . Since , we have . Moreover, suppose that , where , and . Let . Then is an alternating number with digits, and . Since , we have . This completes the proof of Lemma 3.
Next, we discuss the four cases. (1) If is coprime to 10, it follows from Lemma 1 that there exists such that is a multiple of . The conclusion is equivalent to selecting in Lemma 1. (2) If is not divisible by 5, and is divisible by 2, let such that is not divisible by 2, then is coprime to 10. Select with even. It follows from Lemma 3 that there exists an alternating number with digits, where . In addition, . Hence . It follows from Lemma 1 that there exists such that can be divisible by , or . (3) If is divisible by 5, and is not divisible by 2, let such that is not divisible by 5, then is coprime to 10. Select with even. It follows from Lemma 2 that there exist an alternating number with digits, where and can be 0. In addition, . Hence . Using the same argument as (2), there exists an alternating number such that and the last decimal digit . (4) If is divisible by 10, and is not divisible by 20, let with odd, then satisfies the assumption in case (1) or in case (3). It follows from (1) and (3) that there exists an alternating multiple of , where or 5. Now let . Then is an alternating multiple of .
In conclusion, should be a positive integer and should not be divisible by 20.
Lemma 1: If is a positive integer, then there exist such that are odd integers, are even integers, and Proof of Lemma 1 by mathematical induction. If , it follows from that the proposition is true. Assume that if , the proposition is true. When , let by the inductive hypothesis. The problem reduces to proving that there exist with odd and even such that , or , or in view of . It follows from , , and that Lemma 1 is true.
Lemma 2: If is a positive integer, then there exists an alternating number with an even number of digits such that is odd and , where can be 0, but . Proof of Lemma 2 by mathematical induction. If , it follows from that the proposition is true. Assume that if , the proposition is true, or there exists an alternating multiple satisfying . When , let . The problem reduces to proving that there exist with even and odd such that , or . Since is coprime to 25, there exist such that . If is odd, between and , at least one satisfies that the highest-valued digit is even. If is even, between and , at least one satisfies that the highest-valued digit is even. This completes the proof of Lemma 2.
Let , where is coprime to 10 and . Assume that and . Let be an arbitrary multiple of . The last decimal digit is 0, and the digit in tens is even. Hence these do not satisfy the required condition.
① When , consider , , , , , . There must exist two of them congruent modulo . Without loss of generality, we may assume that , and Then Hence because is coprime to 10. Now these positive integers satisfy the required condition.
② When and , it follows from Lemma 1 that there exists an alternating number satisfying . Consider There must exist two of them congruent modulo . Without loss of generality, we may assume that , and Since is coprime to 10, . Moreover, since is coprime to 2, which is alternating.
③ When , it follows from Lemma 2 that there exists an alternating multiple satisfying with odd. Using the same argument as in ②, we obtain that there exist satisfying . Since is coprime to 5, In addition, is alternating, and the last decimal digit is odd.
④ When and , it follows from ③ that there exists an alternating number satisfying that is odd and . Hence , which is alternating.
In conclusion, if is not divisible by 20, then these positive integers satisfy the required condition.
Solution II
should be the positive integers and should satisfy that is not divisible by 20.
(1) Assume that . Select a multiple of arbitrarily. Denote , where . We have . Hence , . This implies that is even. Therefore, is not alternating.
(2) We will prove that if is a positive integer and is not divisible by 20, then must have a multiple which is alternating. We will show three lemmas as follows. Then we divide the proof into four cases.
Lemma 1: If the positive integer is coprime to 10, then for any , there exists such that \frac{\begin{array}{c} 1 \ 00\cdots0 \\ \underline{\quad} \\ \mathbf{number} \ l \ \mathbf{of} \ 0 \end{array} \quad \begin{array}{c} 1 \ 00\cdots0 \\ \underline{\quad} \\ \mathbf{number} \ l \ \mathbf{of} \ 0 \end{array} \quad \begin{array}{c} 1 \cdots 1 \ 00\cdots0 \\ \underline{\quad} \\ \mathbf{number} \ l \ \mathbf{of} \ 0 \end{array} \quad \begin{array}{c} 1 \\ \underline{\quad} \\ \mathbf{total number} \ k \ \mathbf{of} \ 1 \end{array}} is a multiple of . Proof of Lemma 1: Consider the numbers There must exist two of them congruent modulo . Without loss of generality, we may assume that Then . Moreover, since and is coprime to , , and is a positive integer. This completes the proof of Lemma 1.
Lemma 2: For any , there always exists an alternating number with digits such that its first digit can be 0, and its last decimal digit is 5, and . Proof of Lemma 2 by inductive construction. Start with . Suppose that is alternating, where and can be 0. In addition, . Let . Denote Any two of them in are not congruent modulo , and is coprime to . So any two of the numbers in are not congruent modulo . Select such that . Then . Let . Then is an alternating number with digits, where , and its first digit can be 0. In addition, is a multiple of . This completes the proof of Lemma 2.
Lemma 3: For any integer , there always exists an alternating number with digits such that its last decimal digit is 2, and Proof of Lemma 3 by inductive construction. Start with . Suppose that is alternating, where , and . It follows from the property of the alternating numbers that . Denote . Any two of them in are not congruent modulo , and is coprime to . So any two numbers of are not congruent modulo . Now divide the four numbers in by respectively. The original sentence means the 4 numbers are divisible by 8. Since with is odd, the remainders are 1, 3, 5, 7. Let with odd. Select such that . Then . Let . Then is alternating with digits. In addition, and . Since , we have . Moreover, suppose that , where , and . Let . Then is an alternating number with digits, and . Since , we have . This completes the proof of Lemma 3.
Next, we discuss the four cases. (1) If is coprime to 10, it follows from Lemma 1 that there exists such that is a multiple of . The conclusion is equivalent to selecting in Lemma 1. (2) If is not divisible by 5, and is divisible by 2, let such that is not divisible by 2, then is coprime to 10. Select with even. It follows from Lemma 3 that there exists an alternating number with digits, where . In addition, . Hence . It follows from Lemma 1 that there exists such that can be divisible by , or . (3) If is divisible by 5, and is not divisible by 2, let such that is not divisible by 5, then is coprime to 10. Select with even. It follows from Lemma 2 that there exist an alternating number with digits, where and can be 0. In addition, . Hence . Using the same argument as (2), there exists an alternating number such that and the last decimal digit . (4) If is divisible by 10, and is not divisible by 20, let with odd, then satisfies the assumption in case (1) or in case (3). It follows from (1) and (3) that there exists an alternating multiple of , where or 5. Now let . Then is an alternating multiple of .
In conclusion, should be a positive integer and should not be divisible by 20.
Final answer
All positive integers not divisible by 20.
Techniques
Inverses mod nPigeonhole principleInduction / smoothingGreatest common divisors (gcd)