Skip to main content

2014 AIME I Problem 3

Problem 3 of 15EasierNumber TheoryArithmetic

Find the number of rational numbers r,r, 0<r<1,0 \lt r \lt 1, such that when rr is written as a fraction in lowest terms, the numerator and the denominator have a sum of 1000.1000.

Your answer

Integer from 0 to 999
Show solution

Solution

Write r=abr = \frac{a}{b} in lowest terms with a+b=1000;a + b = 1000; since 0<r<1,0 \lt r \lt 1, we need 1≤a≤499.1 \le a \le 499. Because gcd⁡(a,b)=gcd⁡(a,1000−a)\gcd(a, b) = \gcd(a, 1000 - a) =gcd⁡(a,1000),= \gcd(a, 1000), the fraction is in lowest terms exactly when aa is coprime to 1000.1000. There are φ(1000)=1000⋅12⋅45=400\varphi(1000) = 1000 \cdot \frac{1}{2} \cdot \frac{4}{5} = 400 integers in [1,999][1, 999] coprime to 1000,1000, and they pair up as a↔1000−aa \leftrightarrow 1000 - a (note a=500a = 500 is not coprime to 10001000), so exactly 200200 of them are less than 500.500. The answer is 200.200.
AoPS wiki

Tagged: Euler’s Totient Function · greatest common divisor · fraction

More practice