The Fanatical Mathematical Syndicate of the Far North ## The 38th Nordic Mathematical Contest Solutions ## Problem 1 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\left(n^{2}\right)}{T(n)}=R$ ? ## Solution All positive integers $R$. Let $R$ be a positive integer and consider the number $$ N=\sum_{k=0}^{R-1} 10^{2^{k}} $$ We see that $T(N)=R$. Now $$ \begin{aligned} N^{2} & =\left(\sum_{k=0}^{R-1} 10^{2^{k}}\right)^{2} \\ & =\sum_{0 \leq a, bi_{k}$, such that $\operatorname{gcd}\left(r_{k+1}, q\right)=1$ for each $q \in Q_{i_{k+1}}$. Note that such an $i_{k+1}$ always exists, since there always is an infinite amount of prime divisors among $Q_{i_{k}+1}, Q_{i_{k}+2}, \ldots$, and $r_{k+1}$ only has a finite amount of prime divisors. The collection of $Q_{i}$ now forms a partition of $\mathbb{Z}^{+}$. What remains is to show that it satisfies Alice's winning condition. We first see that we may ignore all the $r_{k}$. By definition, no divisor of $r_{k}$ coincides with any divisor of $Q_{i_{k}}$, and their contributions in the $d$-sequence will therefore be completely disjoint. As $d\left(d\left(\left\{r_{k}\right\}\right)\right)=\emptyset$, the $d$-sequence will show no trace of the $r_{k}$ after the second element. Hence, we will work with the original $Q_{i}$. We observe that $d\left(Q_{i}\right)=\left\{1, p_{i 2}, p_{i 3}^{2}, p_{i 4}, p_{i 4}^{3}, p_{i 5}^{2}, p_{i 5}^{4}, p_{i 6}, p_{i 6}^{3}, p_{i 6}^{5}, \ldots\right\}$. This is simply $Q_{i}$ with the indices shifted by 1 and with an added 1 . As this set essentially is on the same form as $Q_{i}$, we see that $\left\{d^{Q_{i}}\right\}_{n}$ consists of every possible shift in indices of the first set $Q_{i}$ (except the element 1 appearing in every other set). It is therefore obvious that the sets in the sequence are pairwise distinct. Additionally, the set of primes dividing some element in some set of $\left\{d^{Q_{i}}\right\}_{n}$ is $P_{i}$. Since the $P_{i}$ partition the primes, it is clear that all the sets in all the $d$-sequences of the $Q_{i}$ are distinct, which is what we wanted. Remark. The main idea of the problem is to construct a single set $S$, such that the sets in the $d$-sequence of $S$ are pairwise distinct. Any set with similar properties to the $Q_{i}$ should give a valid initial collection $\mathcal{C}$ such that Alice wins.