It is given sequence wih length of $2017$ which consists of first $2017$ positive integers in arbitrary order (every number occus exactly once). Let us consider a first term from sequence, let it be $k$. From given sequence we form a new sequence of length 2017, such that first $k$ elements of new sequence are same as first $k$ elements of original sequence, but in reverse order while other elements stay unchanged. Prove that if we continue transforming a sequence, eventually we will have sequence with first element $1$.
2017 Bosnia and Herzegovina EGMO TST
Sarajevo, February 25th
It is given triangle $ABC$ and points $P$ and $Q$ on sides $AB$ and $AC$, respectively, such that $PQ\mid\mid BC$. Let $X$ and $Y$ be intersection points of lines $BQ$ and $CP$ with circumcircle $k$ of triangle $APQ$, and $D$ and $E$ intersection points of lines $AX$ and $AY$ with side $BC$. If $2\cdot DE=BC$, prove that circle $k$ contains intersection point of angle bisector of $\angle BAC$ with $BC$
For positive integer $n$ we define $f(n)$ as sum of all of its positive integer divisors (including $1$ and $n$). Find all positive integers $c$ such that there exists strictly increasing infinite sequence of positive integers $n_1, n_2,n_3,...$ such that for all $i \in \mathbb{N}$ holds $f(n_i)-n_i=c$
Let $a$, $b$, $c$, $d$ and $e$ be distinct positive real numbers such that $a^2+b^2+c^2+d^2+e^2=ab+ac+ad+ae+bc+bd+be+cd+ce+de$ $a)$ Prove that among these $5$ numbers there exists triplet such that they cannot be sides of a triangle $b)$ Prove that, for $a)$, there exists at least $6$ different triplets