Find all positive integers for which there exists a positive integer such that
where denote the fractional part of .
Note: denotes the real number with such that is an integer.
Solution
Denote the equation in the problem statement as (*), and note that it is equivalent to the condition that the average of the remainders when dividing by is . Since is invariant in each residue class modulo for each , it suffices to consider .
If , so is , meaning that does not hold for any . If , then it can be checked that is satisfied if and only if . From now on, we will assume that .
For each , let . Rewriting and multiplying the equation by , we find that
Equivalently, letting ,
Since is not divisible by , which is prime, it follows that . In particular, or . This means that . We claim that all these values of work.
- If , we may choose . The remainders when dividing by are , which have an average of .
- If , we may choose . The remainders when dividing by are , which have an average of .
- If , we may choose . To see this, note that the first four remainders are , which have an average of . The next four remainders () are shifted upwards from the first four remainders by each, and so on, until the th set of the remainders () which have an average of . Hence, the first remainders have an average of . The st remainder is also , meaning that the average of all remainders is .
In conclusion, all values satisfy the initial condition.