Mock AIME 6 2006-2007 Problems/Problem 14
Problem
A rational , where
is a positive integer, is said to be
if its base
representation terminates. Let
be the set of all
rationals. The sum of all the elements in the union set
is
, where
and
are relatively prime positive integers. Find
.
Solution
Denote the set of distinct primes dividing into as
. The rational
is only terminating in base
if for all members
, we have
. As a result,
,
, and
are identical in this respect, for instance, and we can thus reduce the
to:
Clearly for each of the primes
in the list above, the sum of all terminating rationals of such a form is
Thus the primes
respectively contribute
to the total sum. However, each of them overcounts the case
, so we must subtract
at the end to account for this.
Next, we consider the three with multiple distinct prime factors. If we ignore all values already counted above, then the sum of each, for
, is,
Thus the overall sum is
The solution is therefore
.