Question 125
Let $S(N)$ denote the sum of the digits of a positive integer $N$. Find all positive integers $n$ such that
$$
S(n) + S(2n) + S(3n) + \dots + S(n^2) = \frac{4n^2}{15} + 9.
$$
(Nursoltan Khavalbolot)
$$
S(n) + S(2n) + S(3n) + \dots + S(n^2) = \frac{4n^2}{15} + 9.
$$
(Nursoltan Khavalbolot)