Elementary number theory digit sum question.

128 Views Asked by At

Define $f(x)$ as the digit sum function in base $10$; Then, I am tasked with finding solutions to equation:

$$x = 2017f(f(x))\;.$$

My first idea was to use the congruence $x\equiv f(x) \bmod 9$ to obtain $x\equiv f(f(x)) \bmod 9$, hence $x-f(f(x))=9a$, for $a\in\mathbb Z$. Then, solving for $x$ yields from the first equation $x=2017a/224$, and this does yield solutions subject to the condition that $x$, $f(f(x))\ge0\in\mathbb Z$ when different values of $a$ are put in the general solution.

However, the solutions obtained actually satisfy the given equation for $a = 224n$, $n\in[0,9]$ only, and all solutions with $n\ge10$ do not satisfy it. Why is it so? Is there some better way to solve it?

1

There are 1 best solutions below

1
On BEST ANSWER

The digit sum is like log, numbers have to get much larger for their digit sum to increase a little bit. Intuitively, this means that for a number to still be large after taking the digit sum twice, that number must be enormous- far larger than 2017 times the digit sum. This allows us to place an tight enough upper bound on how big $n=f(f(x))$ can be that we can just check everything below it.

For a number to have a digit sum $\ge n$ it must have at least $\frac{n}{9}$ digits, so in particular it must be $\ge 10^{n/9-1}$. So $$x \ge 10 \uparrow(\frac{1}{9}10\uparrow(\frac{f(f(x))}{9}-1)-1)$$ So by substituting $x = 2017n , f(f(x))=n$ $$2017n \ge 10 \uparrow(\frac{1}{9}10\uparrow(\frac{n}{9}-1)-1)$$ If we rearrange this to be about logs instead of exponentials we get: $$\log_{10}(\log_{10}2017+\log_{10} n + 1)+1 = \log_{10}\frac{1}{9} + \frac{n}{9}$$ Plot this in a grapher and you'll be able to see the RHS grows much more quickly, and any $n \ge 25$ is impossible.