Find all natural numbers $ n $ for which there exists two natural numbers $ a,b $ such that $$ n=S(a)=S(b)=S(a+b) , $$where $ S(k) $ denotes the sum of the digits of $ k $ in base $ 10, $ for any natural number $ k. $ Vasile Zidaru and Mircea Lascu
Problem
Source: Romanian JBMO TST 2000, day 1, p. 2
Tags: modular arithmetic, algebra, number theory, base 10
NikoIsLife
16.08.2019 12:21
I claim that the answer is all integers $n$ of the form $\boxed{n=9k}$ for some positive integer $k$.
Proof: First, we show that $n$ must be divisible by $9$ in order for the property to hold.
Observe that for any positive integer $k$, we have $S(k)\equiv k\pmod9$. Therefore, since
$$n=S(a)=S(b)=S(a+b)$$this implies that
$$a\equiv b\equiv a+b\pmod9\implies a\equiv2a\pmod9\implies a\equiv0\pmod9$$This implies that $S(a)$ is divisible by $9$, and so is $n$.
Next, we show that if $n=9k$ for some positive integer $k$, then $a$ and $b$ exists.
Indeed, consider $a=b=\underbrace{909090\cdots909090}$, where the number has exactly $k$ copies of $90$.
This makes $a+b=181818\cdots1818180$, where $a+b$ has exactly $k$ copies of $18$. This gives us
$$S(a)=S(b)=S(909090\cdots909090)=(9+0)\cdot k=9k$$and
$$S(a+b)=S(181818\cdots1818180)=(1+8)\cdot k+0=9k$$Hence, $n=S(a)=S(b)=S(a+b)$.
Devastator
16.08.2019 12:21
I claim that the answer is all multiples of 9. It is easy to see that $n=9k$ works when $a=b=90909090...909$, where there are $k 9’s$
Now, we show that $9|n$
Note that $S(a)=S(a+b)$ implies that $S(a) = S(a+b) \mod 9$
But then this implies that $a = S(a) = S(a+b) = a+b \mod 9$
Thus, $9|b$, so $9|S(b)=n$
Edit: sniped