Number theoryDifficulty 5.0AIME, harderFind the answer
For positive integers a and N, let r(a,N)∈{0,1,…,N−1} denote the remainder of a when divided by N. Determine the number of positive integers n≤1000000 for which r(n,1000)>r(n,1001).
A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.
Solution
Note that 0≤r(n,1000)≤999 and 0≤r(n,1001)≤1000. Consider the (21000)=499500 ways to choose pairs (i,j) such that i>j. By the Chinese Remainder Theorem, there is exactly one n such that 1≤n≤1000⋅1001 such that n≡i(mod1000) and n≡j(mod1001). Finally, it is easy to check that none of the n in the range 1000001 to 1001000 satisfy the condition, so the answer is exactly 499500.
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: Omni-MATH,
licensed Apache-2.0.
Statement reproduced verbatim; metadata (topic, difficulty) added by this project.