DR.WANG Mathematics中文

2023 AIME I · Question 7

Number theory · modular arithmetic · Chinese Remainder Theorem · casework · problem-solving

Problem outline

Count the positive integers below 10001000 whose five remainders modulo 2,3,4,5,62,3,4,5,6 are all different.

Show answer and methods 1 methods

Answer

049

Method 1 Combine the periods 12 and 5

First inspect residues modulo 1212 for divisors 2,3,4,62,3,4,6. Testing 00 through 1111, the pairs of equal remainders for 0,10,1 use divisors 2,32,3; for 2,32,3 use 4,64,6; for 4,54,5 use 2,42,4; for 6,76,7 use 2,62,6; and for 8,98,9 use 2,42,4. Only 10,1110,11 survive; their four remainders are (0,1,2,4)(0,1,2,4) and (1,2,3,5)(1,2,3,5).

In the first case n mod 5n\bmod5 must be 33, in the second it can be 00 or 44. In a period of 6060 this gives 5858 in the first case and 35,5935,59 in the second. The first 960960 integers contain 4848 successes, and the remaining 3939 contain only 960+35960+35, giving 4949.

Source and attribution

The outline and worked methods on this page were prepared for DR.WANG Mathematics.

Original question (external)