Problem:
What is the smallest integer greater than such that the sum of the digits in its base representation is equal to the sum of the digits in its base representation?
Solution
Solution:
We assume that the answer is at most three digits (in base ). Then our desired number can be expressed in the form , where are digits in base , and are digits in base . These variables then satisfy the equations
Subtracting the second equation from the first, we obtain , or . From this equation, we find that must be divisible by , and must be divisible by .
To minimize , we find the minimal possible value of :
If , then the only way for to be divisible by is to set ; however, this is disallowed by the problem condition, which stipulates that the number must be greater than .
If we try , then we find that the only possible value of which lets be divisible by is . Plugging these in and simplifying, we find that we must have . The only possible solution to this is .
Now to satisfy , we must have , or . The minimal possible solution to this is .
So our answer is , which is also equal to .