2023 Nordic

P1

Alice and Bianca have one hundred marbles. At the start of the game they split these hundred marbles into two piles. Thereafter, a move consists of choosing a pile, then choosing a positive integer not larger than half of the number of marbles in that pile, and finally removing that number of marbles from the chosen pile. The first player unable to remove any marbles loses. Alice makes the first move of the game. Determine all initial pile sizes for which Bianca has a winning strategy.

P2

Find all functions $f: \mathbb{N} \to \mathbb{N}$ such that $$\gcd(f(x),y)f(xy)=f(x)f(y)$$for all positive integers $x, y$.

P3

Find all functions $f:\mathbb{N}_0 \to \mathbb{Z}$ such that $$f(k)-f(l) \mid k^2-l^2$$for all integers $k, l \geq 0$.

P4

Let $ABC$ be a triangle, and $M$ the midpoint of the side $BC$. Let $E$ and $F$ be points on the sides $AC$ and $AB$, respectively, so that $ME=MF$. Let $D$ be the second intersection of the circumcircle of $MEF$ and the side $BC$. Consider the lines $\ell_D$, $\ell_E$ and $\ell_F$ through $D, E$ and $F$, respectively, such that $\ell_D \perp BC$, $\ell_E \perp AC$ and $\ell_F \perp AB$. Show that $\ell_D, \ell_E$ and $\ell_F$ are concurrent.