Try this beautiful problem from the American Invitational Mathematics Examination I, AIME I, 1992 based on Digits and Rationals.
Let S be the set of all rational numbers r, 0<r<1, that have a repeating decimal expression in the form 0.abcabcabcabc.... where the digits a,b and c are not necessarily distinct. To write the elements of S as fractions in lowest terms find number of different numerators required.
Integers
Digits
Prime
Answer: is 660.
AIME I, 1992, Question 5
Elementary Number Theory by David Burton
Let x=0.abcabcabcabc.....
\(\Rightarrow 1000x=abc.\overline{abc}\)
\(\Rightarrow 999x=1000x-x=abc\)
\(\Rightarrow x=\frac{abc}{999}\)
numbers relatively prime to 999 gives us the numerators
\(\Rightarrow 999(1-\frac{1}{3})(1-\frac{1}{111})\)=660
=660.