There are fractions with the properties: and are positive integers with , is in lowest terms, is not divisible by the square of any integer larger than 1, and the shortest sequence of consecutive digits that repeats consecutively and indefinitely in the decimal equivalent of has length 6. We define , where the integer has digits. What is the sum of the squares of the digits of ?
Solution
We start with 1111109 fractions, as above, and want to remove all of the fractions in and . Since each fraction in is in and , it is enough to remove those and only. The total number of fractions in and (that is, in ) equals the number of fractions in plus the number of fractions in minus the number of fractions in their overlap (that is, in . This is because any fraction in the overlap is "counted twice" when include all fractions in and all fractions in . Therefore, we need to remove fractions from the set of 1111109. Therefore, , the number of fractions having the desired properties, is . Since has 7 digits, then . The sum of the squares of the digits of is .
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.