Which positive integers $n$ make the equation \[\sum_{i=1}^n \sum_{j=1}^n \left\lfloor \frac{ij}{n+1} \right\rfloor=\frac{n^2(n-1)}{4}\]true?
2022 SAFEST Olympiad
Day 1
Let $n \geq 2$ be an integer. Prove that if $$\frac{n^2+4^n+7^n}{n}$$is an integer, then it is divisible by 11.
A hunter and an invisible rabbit play a game on an infinite square grid. First the hunter fixes a colouring of the cells with finitely many colours. The rabbit then secretly chooses a cell to start in. Every minute, the rabbit reports the colour of its current cell to the hunter, and then secretly moves to an adjacent cell that it has not visited before (two cells are adjacent if they share an edge). The hunter wins if after some finite time either: the rabbit cannot move; or the hunter can determine the cell in which the rabbit started. Decide whether there exists a winning strategy for the hunter. Proposed by Aron Thomas
Day 2
Let $S$ be an infinite set of positive integers, such that there exist four pairwise distinct $a,b,c,d \in S$ with $\gcd(a,b) \neq \gcd(c,d)$. Prove that there exist three pairwise distinct $x,y,z \in S$ such that $\gcd(x,y)=\gcd(y,z) \neq \gcd(z,x)$.
Let $ABCD$ be a convex quadrilateral such that the circle with diameter $AB$ is tangent to the line $CD$, and the circle with diameter $CD$ is tangent to the line $AB$. Prove that the two intersection points of these circles and the point $AC \cap BD$ are collinear.
Show that $n!=a^{n-1}+b^{n-1}+c^{n-1}$ has only finitely many solutions in positive integers. Proposed by Dorlir Ahmeti, Albania