Problem

Source: 2015 Latvia BW TST P14

Tags: number theory, sum of digits



Let $S(a)$ denote the sum of the digits of the number $a$. Given a natural $R$ can one find a natural $n$ such that $\frac{S (n^2)}{S (n)}= R$?