For any natural number $n$, expressed in base $10$, let $S(n)$ denote the sum of all digits of $n$. Find all natural numbers $n$ such that $n=2S(n)^2$.
Problem
Source: RMO Mumbai 2016, P3
Tags: number theory, inequalities, sum of digits
11.10.2016 10:44
below is my thinking , if any mistake please tell me : clearly n can not > 2592 since 2*(9+9+9+9)^2 = 2592 consider 2k^2 , k start from 1 to 36 it doesn't take too long to examine them and result that 50,162,392,648 are the solutions. (you just need to calculate the value 2k^2 and sum it's all digits and check if equal k)
11.10.2016 11:01
We use bounding first. If $n$ has $j$ digits, clearly $n$$\geq$$10^{j-1}$ and $S(n)$$\leq$$9j$. Using this, we get that $j$$\leq$$4$. Now, we use the fact that $n=S(n)$ with mod $9$, to drastically reduce the number of cases. We get the final answer as $50,162,392,648$.
16.06.2021 14:41
Deleted post.
17.06.2021 22:10
Sorry to dissapoint you nathantareep but this is actually rather easy. Clearly we can let n=2k^2 for some natural k and we shall have k=S(2*k^2). Take mod 9 and use S(x) = x mod9 and you get k=0,5 mod9. From here ther are only a couple possibilities to check
25.06.2021 12:30
Deleted post.
09.02.2022 10:26
Clearly, $ n=2q^2 $ for some natural number q. Claim : $ n<1000 $ Proof : Let $ 1000 \le n \le 9999 $ then $ 1 \le S(n) \le 36 $ and $ 1 \le 2S(n)^2 \le 2592 $ $ \Longrightarrow 1000 \le n \le 2592 $ again, $ 1 \le S(n) \le 28 $ (as 1999 has maximum sum) $ \Longrightarrow 1 \le 2S(n)^2 \le 1568 $ So, $ 1000 \le n \le 1568 $ again, $ 1 \le S(n) \le 23 $ (as 1499 has maximum sum) $ \Longrightarrow 1000 \le n \le 1058 $ $ \Longrightarrow 500 \le \frac{n}{2} \le 529 $ $ \Longrightarrow 500 \le q^2 \le 529 $ $ \Longrightarrow q=23 $ but plugging in q=23 doesn't satisfy Also notice that $ n \le 10000 $ as if $99999 \ge n \ge 10000 $ then $ S(n) \le 45 $ $ \Longrightarrow 1 \le 2S(n)^2=n \le 4050$ leading to contradiction So, our claim is proved. Some casework leads to $ q=5,9,14,18 $ $ \Longrightarrow n=50,162,392,648 $ are the only solutions.
10.02.2022 20:14
INMO2021 wrote: So, $ 1000 \le n \le 1568 $ again, $ 1 \le S(n) \le 23 $ (as 1499 has maximum sum) Not really, $999$ has digit sum $27$. So you should still check $q=27$ in the end.
30.03.2022 18:03
Let $n$ have $d$ digits, then: $$10^{d-1}\le n=2S(n)^2\le2(9d)^2$$so $d\le4$. Then suppose that $d=4$, we have the inequalities
Solutions: $n=50,162,392,648$.
24.10.2023 17:29
I think it is also worth noting that either n is congruent to 0 modulo 9 or n is congruent to 5 modulo 9.
27.11.2024 19:08
Similar ideas also used in RMO 2023 P3. Let $n=a_ka_{k-1}\cdots a_0$, the problem is now equivalent to \begin{align*}\sum_{i=0}^{k}10^i a_i&=2\underbrace{\left(\sum_{i=0}^{i}a_i\right)^2}_{\leq (9(k+1))^2}\\ \implies \sum_{i=0}^{k}10^i a_i&\leq 162(k+1)^2\end{align*}This holds only for $k=0,1,2,3$ $\textbf{\textsf{Case 1.}}$ $k=0,1,2$ After doing casework we see that $S(n)=5,9,14,18$ work with corresponding $n$ values as $\boxed{50,162,392,648}$ $\textbf{\textsf{Case 2.}}$ $k=3$ We have $S(n)\leq 36\implies n=2(S(n))^2\leq 2592$, $\text{max}(S(n))=28\implies n\leq 1568$ we repeat this process again and again to finally get no $4$ digits numbers possible