How many positive integers are there such that has a solution in positive integers ?
Solution
First, we can let so that where . Making these substitutions yields , so . Because and are relatively prime, shares no common factors with neither nor , so in order to have be an integer, must divide 2013, and since and are positive, . We first show that for different possible values of , the values of generated are distinct. In particular, we need to show that whenever . Assume that such an equality exists, and cross-multiplying yields . Since is relatively prime to , we must have divide . With a similar argument, we can show that must divide , so . Now, we need to show that for the same denominator , the values of generated are also distinct for some relatively prime non-ordered pair . Let . Assume that , or equivalently, . After some rearrangement, we have This implies that either or . But in either case, is some permutation of . Our answer can therefore be obtained by summing up the totients of the factors of 2013 (excluding 1) and dividing by 2 since and correspond to the same value, so our answer is 1006.