problem: 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, b<R} 10^{2^{a}+2^{b}},
\end{aligned}
$$

and since $2^{a}+2^{b}=2^{c}+2^{d}$ if and only if $(a, b)=(c, d)$ or $(a, b)=(d, c)$, there is never a carry in the summation $\sum_{0 \leq a, b<R} 10^{2^{a}+2^{b}}$, and we can write

$$
\begin{aligned}
T\left(N^{2}\right) & =\sum_{0 \leq a, b<R} T\left(10^{2^{a}+2^{b}}\right) \\
& =R^{2}
\end{aligned}
$$

So $\frac{T\left(n^{2}\right)}{T(n)}=R$.

problem_match: ## Problem 1

solution_match: ## Solution


problem: Let $\mathcal{Q}_{1}$ be a quadrilateral such that the midpoints of its sides lie on a circle. Prove that there exists a cyclic quadrilateral $\mathcal{Q}_{2}$ with the same sidelengths as $\mathcal{Q}_{1}$, such that two of the angles in $\mathcal{Q}_{2}$ are equal.

solution:
Let $A, B, C$ and $D$ be the vertices of $\mathcal{Q}_{1}$, and $K, L, M$ and $N$ be the midpoints of the sides $A B, B C, C D$ and $D A$, respectively.
We have $K L\|A C\| M N$ and $L M\|B D\| N K$, and thus $K L M N$ is a parallelogram. From the problem condition it is known that $K L M N$ is cyclic, and thus, from the inscribed angle theorem, $K L M N$ must be a rectangle. Hence, $A C \perp B D$. Now, let $P$ denote the intersections of the diagonals of $A B C D$.
![](https://cdn.mathpix.com/cropped/2024_12_18_aa8d9be57dc2071c8578g-3.jpg?height=407&width=763&top_left_y=936&top_left_x=652)

Applying Pythagoras' theorem repeatedly therefore yields

$$
|A B|^{2}+|C D|^{2}=|A P|^{2}+|B P|^{2}+|C P|^{2}+|D P|^{2}=|A D|^{2}+|B C|^{2} .
$$

Thus, we can construct the quadrilateral $\mathcal{Q}_{2}$ with a segment $A^{\prime} C^{\prime}$ satisfying $\left|A^{\prime} C^{\prime}\right|^{2}=|A B|^{2}+$ $|C D|^{2}$, and then place $B^{\prime}, D^{\prime}$ on the circle with diameter $A^{\prime} C^{\prime}$ on opposite sides of $A^{\prime} C^{\prime}$ such that $\left|A^{\prime} B^{\prime}\right|=|A B|$ and $\left|A^{\prime} D^{\prime}\right|=|A D|$.
From the previous computation, we then obtain $\left|C^{\prime} B^{\prime}\right|=|C D|$ and $\left|C^{\prime} D^{\prime}\right|=|B C|$. Hence, $\mathcal{Q}_{2}$ and $\mathcal{Q}_{1}$ has the same set of sidelengths. Finally, $A^{\prime} B^{\prime} \perp B^{\prime} C^{\prime}$ and $A^{\prime} D^{\prime} \perp D^{\prime} C^{\prime}$, so $\mathcal{Q}_{2}$ has two identical right angels.

problem_match: ## Problem 2


problem:
Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that

$$
f(f(x) f(y)+y)=f(x) y+f(y-x+1)
$$

for all $x, y \in \mathbb{R}$.

solution:
First note that $f$ satisfies the functional equation if and only if $-f$ does as well. We can therefore assume that $f(0) \geq 0$. We consider two cases, depending on whether $f$ is injective or not.

1. First assume that $f$ is not injective. Then there exist $a, t \in \mathbb{R}, t \neq 0$ such that $f(a+t)=$ $f(a)$. Apply the substitutions $x \mapsto a, y \mapsto y$ and $x \mapsto a+t, y \mapsto y$ to the functional equation (3.1). This gives:

$$
f(y-a+1)=f(f(a) f(y)+y)-f(a) y
$$

and

$$
f(y-a-t+1)=f(f(a+t) f(y)+y)-f(a+t) y
$$

As $f(a+t)=f(a)$ the right hand sides of the equations are equal to one another. Hence

$$
f(y-a+1)=f(y-a-t+1) .
$$

Applying the substitution $y \mapsto x+a+t-1$ to equation (3.2) yields:

$$
f(x+t)=f(x) .
$$

In other words $f$ is $t$-periodic. Perform the substitution $x \mapsto x$ and $y \mapsto y+t$ to equation (3.1). The result is

$$
f(f(x) f(y+t)+y+t)=f(x)(y+t)=f(y+t-x+1) .
$$

As $f$ is $t$-periodic we have $f(y+t)=f(y), f(f(x) f(y)+y+t)=f(f(x) f(y)+y)$ and $f(y+t-x+1)=f(y-x+1)$. As a result equation (3.4) simplifies to

$$
f(f(x) f(y)+y)=f(x)(y+t)+f(y-x+1)
$$

By comparing equation (3.5) with the given equation (3.1) we get

$$
f(x) y=f(x)(y+t)
$$

As $t \neq 0$ it follows that $f(x)=0$. That is $f$ is the zero function.
2. Next assume that $f$ is injective. Apply the substitution $x \mapsto x$ and $y \mapsto 0$ to the functional equation (3.1). This gives

$$
f(f(x) f(0))=f(-x+1)
$$

As $f$ injective, the arguments must equate, that is

$$
f(x) f(0)=1-x
$$

Evaluation this equation at $x=0$ gives $(f(0))^{2}=1$, that is $f(0)=1$ as we assumed that $f(0) \geq 0$. Equation (3.6) simplifies to

$$
f(x)=1-x
$$

It remains to verify that the candidates $f(x)=0$ and $f(x)=1-x$ are in fact solution to the functional equation. Routine calculation show that this is the case. We have hence found that the complete collection of solutions to the functional equation is

$$
f: \mathbb{R} \longrightarrow \mathbb{R}, x \longmapsto 0, f: \mathbb{R} \longrightarrow \mathbb{R}, x \longmapsto x-1 \quad \text { and } \quad f: \mathbb{R} \longrightarrow \mathbb{R}, x \longmapsto 1-x .
$$

problem_match: ## Problem 3


problem:
Alice and Bob are playing a game. First, Alice chooses a partition $\mathcal{C}$ of the positive integers into a (not necessarily finite) set of sets, such that each positive integer is in exactly one of the sets in $\mathcal{C}$. Then Bob does the following operation a finite number of times.
Choose a set $S \in \mathcal{C}$ not previously chosen, and let $D$ be the set of all positive integers dividing at least one element in $S$. Then add the set $D \backslash S$ (possibly the empty set) to $\mathcal{C}$.
Bob wins if there are two equal sets in $\mathcal{C}$ after he has done all his moves, otherwise, Alice wins. Determine which player has a winning strategy.

Answer: Alice has a winning strategy.

solution:
We will use the following notation. If $S \subseteq \mathbb{Z}^{+}$is a subset of the positive integers and $D$ is defined as in the problem statement, define $d(S)=D \backslash S$. In addition, the $d$-sequence of $S$, written $\left\{d^{S}\right\}_{n \in \mathbb{Z}^{+}}$, is defined recursively as $d_{0}^{S}=S$, and $d_{n+1}^{S}=d\left(d_{n}^{S}\right)$ for each $n \in \mathbb{Z}^{+}$.
Let $p_{1}, p_{2}, \ldots$ be an enumeration of all the prime numbers. Alice chooses the sets

$$
A=\left\{p_{m}^{n} \mid n \equiv m \quad \bmod 3,0<n \leq m\right\}, \quad B=\left\{p_{m}^{n} \mid n \equiv m-1 \quad \bmod 3,0<n \leq m-1\right\}
$$

and

$$
C=\mathbb{Z}^{+} \backslash(A \cup B)
$$

It is clear that each positive integer belongs to exactly on of the sets $A, B$ or $C$. By induction we readily get that

$$
d^{k}(A)=\left\{\begin{array}{ll}
\left\{p_{m}^{n} \mid n \equiv m\right. & \bmod 3, n \leq m-3 k / 2\} \\
\left\{p_{m}^{n} \mid n \not \equiv m\right. & \bmod 3, n \leq m-1-3(k-1) / 2\}
\end{array} \quad \text { if } k \text { is even and } k \neq 0\right.
$$

and

$$
d^{k}(B)=\left\{\begin{array}{lll}
\left\{p_{m}^{n} \mid n \equiv m-1\right. & \bmod 3, n \leq m-1-3 k / 2\} & \text { if } k \text { is even and } k \neq 0 \\
\left\{p_{m}^{n} \mid n \not \equiv m-1\right. & \bmod 3, n \leq m-2-3(k-1) / 2\} & \text { if } k \text { is odd. }
\end{array}\right.
$$

If $m \in \mathbb{Z}^{+}$then $6 m$ is definitely in $C$ as $6 m$ is not a power of a prime. This means that all positive integers divide at least one number in $C$. It follows that

$$
d(C)=\mathbb{Z}^{+} \backslash C=\mathbb{Z}^{+} \backslash\left(\mathbb{Z}^{+} \backslash(A \cup B)\right)=A \cup B=\left\{p_{m}^{n} \mid n \not \equiv m-2 \bmod 3,0<n \leq m\right\}
$$

By induction it follows that

From this it is clear that all of the sets $d^{k}(M)$ are all distinct. Hence Bob can never create the same set in two different ways.

Remark. In fact Alice has to partition the positive integers in at least three parts if she wishes to beat Bob. It is clear that selecting a singe set, namely $\mathbb{Z}^{+}$will not do as $d\left(\mathbb{Z}^{+}\right)=\emptyset$ and $d(\emptyset)=\emptyset$. Next assume Alice has partitioned the positive integers in two sets $A$ and $B$. It can be assumed that $d(A) \neq B$ and $d(B) \neq A$ as Bob would win either case. As $d(A)$ is disjoint from $A$ and $B$ is the complement of $A$ this means that $d(A)$ is a strict subset of $B$. Hence there is some $b$ in $B$ that does not belong to $d(A)$. The implication is that $b$ does not divide any number in $A$. Similarly there exists a number $a$ in $A$ that does not divide any number in $B$. Their product $a b$ belongs to either of the sets $A$ or $B$ and is divisible by both $a$ and $b$. This contradicts the existence of said numbers, $a$ and $b$. In fact we have proven for any subset $A$ of $\mathbb{Z}^{+}$that $d(A)=\mathbb{Z}^{+} \backslash A$ or $d\left(\mathbb{Z}^{+} \backslash A\right)=A$.

problem_match: ## Problem 4

solution_match: ## Solution 1


solution:
Use the same notation as in solution 1 . We wish to construct a partition $\bigcup_{i \in \mathbb{Z}^{+}} A_{i}$ of the positive integers, such that no two sets among all sets in $\left\{d^{A_{1}}\right\}_{n \in \mathbb{Z}^{+}},\left\{d^{A_{2}}\right\}_{n \in \mathbb{Z}^{+}}, \ldots$ are equal.
To begin with, consider a partition $\bigcup_{i \in \mathbb{Z}^{+}} P_{i}$ of the primes, such that each $P_{i}=\left\{p_{i 1}, p_{i 2}, \ldots\right\}$ is infinite. We may assume each set is infinite since the set of primes and $\mathbb{Z}^{+} \times \mathbb{Z}^{+}$both are countable, so there exists a bijection between them. Define the sets

$$
Q_{i}=\left\{p_{i 1}, p_{i 2}^{2}, p_{i 3}, p_{i 3}^{3}, p_{i 4}^{2}, p_{i 4}^{4}, p_{i 5}, p_{i 5}^{3}, p_{i 5}^{5}, \ldots\right\}
$$

consisting of $p_{i j}^{j}, p_{i j}^{j-2}, \ldots, p_{i j}^{(1,2)}$ for each $p_{i j} \in P_{i}$. By the exponent $(1,2)$ we indicate that the last power is 1 when $j$ is odd and 2 when it is even.
We will include the remaining integers $\left\{r_{1}, r_{2}, \ldots\right\}=\mathbb{Z}^{+} \backslash\left(\bigcup_{i \in \mathbb{Z}^{+}} Q_{i}\right)$ to the partition as follows. First, add $r_{1}$ to some set $Q_{i_{1}}$, such that $\operatorname{gcd}\left(r_{1}, q\right)=1$ for each $q \in Q_{i_{1}}$. Then, for each $k \in \mathbb{Z}^{+}$, add $r_{k+1}$ to a set $Q_{i_{k+1}}$ where $i_{k+1}>i_{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.

solution_match: ## Solution 2