Let $T(a)$ be the sum of digits of $a$. For which positive integers $R$ does there exist a positive integer $n$ such that $\frac{T(n^2)}{T(n)}=R$?
Problem
Source: Nordic, NMC
Tags: Nordic, algebra
pco
18.04.2024 15:38
anirbanbz wrote: Let $T(a)$ be the sum of digits of $a$. For which positive integers $R$ does there exist a positive integer $n$ such that $\frac{T(n^2)}{T(n)}=R$? Let $a_n=\sum_{i=0}^{n-1}10^{2^i-1}$ It is easy to show that $T(a_n)=n$ and $T(a_n^2)=n^2$ and so $\frac{T(a_n^2)}{T(a_n)}=n$ And so answer $\boxed{\text{For any positive integer}}$
Mr.Sharkman
18.04.2024 16:29
The idea here is you want to have no carries. Thus, we want the placement of the $i$th nonzero digit to be at least twice the placement of the $i-1$ th. Now, we see that if $$a_{n} = \sum_{i=1}^{n-1} 10^{2^{i}}.$$Notice that $T(a_{n})=n,$ while $$T(a_{n}^{2}) = T(\sum_{i=2^{j}+2^{k}} 10^{i}) = 1 \cdot n^{2} = n^{2}.$$Thus, we are done.