Let $f:\mathbb N\rightarrow\mathbb N$ be a non-decreasing function and let $n$ be an arbitrary natural number. Suppose that there are prime numbers $p_1,p_2,\dots,p_n$ and natural numbers $s_1,s_2,\dots,s_n$ such that for each $1\leq i\leq n$ the set $\{f(p_ir+s_i)|r=1,2,\dots\}$ is an infinite arithmetic progression. Prove that there is a natural number $a$ such that \[f(a+1), f(a+2), \dots, f(a+n)\] form an arithmetic progression.
2010 Iran Team Selection Test
Day 1
Find all non-decreasing functions $f:\mathbb R^+\cup\{0\}\rightarrow\mathbb R^+\cup\{0\}$ such that for each $x,y\in \mathbb R^+\cup\{0\}$ \[f\left(\frac{x+f(x)}2+y\right)=2x-f(x)+f(f(y)).\]
Find all two-variable polynomials $p(x,y)$ such that for each $a,b,c\in\mathbb R$: \[p(ab,c^2+1)+p(bc,a^2+1)+p(ca,b^2+1)=0\]
Day 2
$S,T$ are two trees without vertices of degree 2. To each edge is associated a positive number which is called length of this edge. Distance between two arbitrary vertices $v,w$ in this graph is defined by sum of length of all edges in the path between $v$ and $w$. Let $f$ be a bijective function from leaves of $S$ to leaves of $T$, such that for each two leaves $u,v$ of $S$, distance of $u,v$ in $S$ is equal to distance of $f(u), f(v)$ in $T$. Prove that there is a bijective function $g$ from vertices of $S$ to vertices of $T$ such that for each two vertices $u,v$ of $S$, distance of $u,v$ in $S$ is equal to distance of $g(u)$ and $g(v)$ in $T$.
Circles $W_1,W_2$ intersect at $P,K$. $XY$ is common tangent of two circles which is nearer to $P$ and $X$ is on $W_1$ and $Y$ is on $W_2$. $XP$ intersects $W_2$ for the second time in $C$ and $YP$ intersects $W_1$ in $B$. Let $A$ be intersection point of $BX$ and $CY$. Prove that if $Q$ is the second intersection point of circumcircles of $ABC$ and $AXY$ \[\angle QXA=\angle QKP\]
Let $M$ be an arbitrary point on side $BC$ of triangle $ABC$. $W$ is a circle which is tangent to $AB$ and $BM$ at $T$ and $K$ and is tangent to circumcircle of $AMC$ at $P$. Prove that if $TK||AM$, circumcircles of $APT$ and $KPC$ are tangent together.
Day 3
Without lifting pen from paper, we draw a polygon in such away that from every two adjacent sides one of them is vertical. In addition, while drawing the polygon all vertical sides have been drawn from up to down. Prove that this polygon has cut itself.
Let $ABC$ an isosceles triangle and $BC>AB=AC$. $D,M$ are respectively midpoints of $BC, AB$. $X$ is a point such that $BX\perp AC$ and $XD||AB$. $BX$ and $AD$ meet at $H$. If $P$ is intersection point of $DX$ and circumcircle of $AHX$ (other than $X$), prove that tangent from $A$ to circumcircle of triangle $AMP$ is parallel to $BC$.
Sequence of real numbers $a_0,a_1,\dots,a_{1389}$ are called concave if for each $0<i<1389$, $a_i\geq\frac{a_{i-1}+a_{i+1}}2$. Find the largest $c$ such that for every concave sequence of non-negative real numbers: \[\sum_{i=0}^{1389}ia_i^2\geq c\sum_{i=0}^{1389}a_i^2\]
Day 4
In every $1\times1$ square of an $m\times n$ table we have drawn one of two diagonals. Prove that there is a path including these diagonals either from left side to the right side, or from the upper side to the lower side.
Let $O, H$ be circumcenter and orthogonal center of triangle $ABC$. $M,N$ are midpoints of $BH$ and $CH$. $BB'$ is diagonal of circumcircle. If $HONM$ is a cyclic quadrilateral, prove that $B'N=\frac12AC$.
Prove that for each natural number $m$, there is a natural number $N$ such that for each $b$ that $2\leq b\leq1389$ sum of digits of $N$ in base $b$ is larger than $m$.