Find all polynomials $P(x)$ and $Q(x)$ with real coefficients such that $$P(Q(x))=P(x)^{2017}$$for all real numbers $x$.
2017 Iran MO (3rd round)
Mid-Terms
Algebra
Let $a,b,c$ and $d$ be positive real numbers such that $a^2+b^2+c^2+d^2 \ge 4$. Prove that $$(a+b)^3+(c+d)^3+2(a^2+b^2+c^2+d^2) \ge 4(ab+bc+cd+da+ac+bd)$$
Find all functions $f:\mathbb{R^+}\rightarrow\mathbb{R^+}$ such that $$\frac{x+f(y)}{xf(y)}=f(\frac{1}{y}+f(\frac{1}{x}))$$for all positive real numbers $x$ and $y$.
Number Theory
Let $n$ be a positive integer. Consider prime numbers $p_1,\dots ,p_k$. Let $a_1,\dots,a_m$ be all positive integers less than $n$ such that are not divisible by $p_i$ for all $1 \le i \le n$. Prove that if $m\ge 2$ then $$\frac{1}{a_1}+\dots+\frac{1}{a_m}$$is not an integer.
Consider a sequence $\{a_i\}^\infty_{i\ge1}$ of positive integers. For all positvie integers $n$ prove that there exists infinitely many positive integers $k$ such that there is no pair $(m,t)$ of positive integers where $m>n$ and $$kn+a_n=tm(m+1)+a_m$$
Let $k$ be a positive integer. Find all functions $f:\mathbb{N}\to \mathbb{N}$ satisfying the following two conditions: • For infinitely many prime numbers $p$ there exists a positve integer $c$ such that $f(c)=p^k$. • For all positive integers $m$ and $n$, $f(m)+f(n)$ divides $f(m+n)$.
Geometry
Let $ABC$ be a triangle. Suppose that $X,Y$ are points in the plane such that $BX,CY$ are tangent to the circumcircle of $ABC$, $AB=BX,AC=CY$ and $X,Y,A$ are in the same side of $BC$. If $I$ be the incenter of $ABC$ prove that $\angle BAC+\angle XIY=180$.
Let $ABCD$ be a trapezoid ($AB<CD,AB\parallel CD$) and $P\equiv AD\cap BC$. Suppose that $Q$ be a point inside $ABCD$ such that $\angle QAB=\angle QDC=90-\angle BQC$. Prove that $\angle PQA=2\angle QCD$.
Let $ABC$ be an acute-angle triangle. Suppose that $M$ be the midpoint of $BC$ and $H$ be the orthocenter of $ABC$. Let $F\equiv BH\cap AC$ and $E\equiv CH\cap AB$. Suppose that $X$ be a point on $EF$ such that $\angle XMH=\angle HAM$ and $A,X$ are in the distinct side of $MH$. Prove that $AH$ bisects $MX$.
Combinatorics
There's a tape with $n^2$ cells labeled by $1,2,\ldots,n^2$. Suppose that $x,y$ are two distinct positive integers less than or equal to $n$. We want to color the cells of the tape such that any two cells with label difference of $x$ or $y$ have different colors. Find the minimum number of colors needed to do so.
An angle is considered as a point and two rays coming out of it. Find the largest value on $n$ such that it is possible to place $n$ $60$ degree angles on the plane in a way that any pair of these angles have exactly $4$ intersection points.
Ali has $6$ types of $2\times2$ squares with cells colored in white or black, and has presented them to Mohammad as forbidden tiles. $a)$ Prove that Mohammad can color the cells of the infinite table (from each $4$ sides.) in black or white such that there's no forbidden tiles in the table. $b)$ Prove that Ali can present $7$ forbidden tiles such that Mohammad cannot achieve his goal.
Finals
Geometry
Let $ABC$ be a right-angled triangle $\left(\angle A=90^{\circ}\right)$ and $M$ be the midpoint of $BC$. $\omega_1$ is a circle which passes through $B,M$ and touchs $AC$ at $X$. $\omega_2$ is a circle which passes through $C,M$ and touchs $AB$ at $Y$ ($X,Y$ and $A$ are in the same side of $BC$). Prove that $XY$ passes through the midpoint of arc $BC$ (does not contain $A$) of the circumcircle of $ABC$.
Assume that $P$ be an arbitrary point inside of triangle $ABC$. $BP$ and $CP$ intersects $AC$ and $AB$ in $E$ and $F$, respectively. $EF$ intersects the circumcircle of $ABC$ in $B'$ and $C'$ (Point $E$ is between of $F$ and $B'$). Suppose that $B'P$ and $C'P$ intersects $BC$ in $C''$ and $B''$ respectively. Prove that $B'B''$ and $C'C''$ intersect each other on the circumcircle of $ABC$.
In triangle $ABC$ points $P$ and $Q$ lies on the external bisector of $\angle A$ such that $B$ and $P$ lies on the same side of $AC$. Perpendicular from $P$ to $AB$ and $Q$ to $AC$ intersect at $X$. Points $P'$ and $Q'$ lies on $PB$ and $QC$ such that $PX=P'X$ and $QX=Q'X$. Point $T$ is the midpoint of arc $BC$ (does not contain $A$) of the circumcircle of $ABC$. Prove that $P',Q'$ and $T$ are collinear if and only if $\angle PBA+\angle QCA=90^{\circ}$.
Number Theory
Let $x$ and $y$ be integers and let $p$ be a prime number. Suppose that there exist realatively prime positive integers $m$ and $n$ such that $$x^m \equiv y^n \pmod p$$Prove that there exists an unique integer $z$ modulo $p$ such that $$x \equiv z^n \pmod p \quad \text{and} \quad y \equiv z^m \pmod p$$
For prime number $q$ the polynomial $P(x)$ with integer coefficients is said to be factorable if there exist non-constant polynomials $f_q,g_q$ with integer coefficients such that all of the coefficients of the polynomial $Q(x)=P(x)-f_q(x)g_q(x)$ are dividable by $q$ ; and we write: $$P(x)\equiv f_q(x)g_q(x)\pmod{q}$$For example the polynomials $2x^3+2,x^2+1,x^3+1$ can be factored modulo $2,3,p$ in the following way: $$\left\{\begin{array}{lll} X^2+1\equiv (x+1)(-x+1)\pmod{2}\\ 2x^3+2\equiv (2x-1)^3\pmod{3}\\ X^3+1\equiv (x+1)(x^2-x+1) \end{array}\right.$$ Also the polynomial $x^2-2$ is not factorable modulo $p=8k\pm 3$. a) Find all prime numbers $p$ such that the polynomial $P(x)$ is factorable modulo $p$: $$P(x)=x^4-2x^3+3x^2-2x-5$$b) Does there exist irreducible polynomial $P(x)$ in $\mathbb{Z}[x]$ with integer coefficients such that for each prime number $p$ , it is factorable modulo $p$?
Let $n$ be a positive integer. Prove that there exists a poisitve integer $m$ such that $$7^n \mid 3^m+5^m-1$$
Algebra
Let $\mathbb{R}^{\ge 0}$ be the set of all nonnegative real numbers. Find all functions $f:\mathbb{R}^{\ge 0} \to \mathbb{R}^{\ge 0}$ such that $$ x+2 \max\{y,f(x),f(z)\} \ge f(f(x))+2 \max\{z,f(y)\}$$for all nonnegative real numbers $x,y$ and $z$.
Let $P(z)=a_d z^d+\dots+ a_1z+a_0$ be a polynomial with complex coefficients. The $reverse$ of $P$ is defined by $$P^*(z)=\overline{a_0}z^d+\overline{a_1}z^{d-1}+\dots+\overline{a_d}$$(a) Prove that $$P^*(z)=z^d \overline{ P\left( \frac{1}{\overline{z}} \right) } $$(b) Let $m$ be a positive integer and let $q(z)$ be a monic nonconstant polynomial with complex coefficients. Suppose that all roots of $q(z)$ lie inside or on the unit circle. Prove that all roots of the polynomial $$Q(z)=z^m q(z)+ q^*(z)$$lie on the unit circle.
Let $a,b$ and $c$ be positive real numbers. Prove that $$\sum_{cyc} \frac {a^3b}{(3a+2b)^3} \ge \sum_{cyc} \frac {a^2bc}{(2a+2b+c)^3} $$
Combinatorics
There are $100$ points on the circumference of a circle, arbitrarily labelled by $1,2,\ldots,100$. For each three points, call their triangle clockwise if the increasing order of them is in clockwise order. Prove that it is impossible to have exactly $2017$ clockwise triangles.
Two persons are playing the following game on a $n\times m$ table, with drawn lines: Person $\#1$ starts the game. Each person in their move, folds the table on one of its lines. The one that could not fold the table on their turn loses the game. Who has a winning strategy?
$30$ volleyball teams have participated in a league. Any two teams have played a match with each other exactly once. At the end of the league, a match is called unusual if at the end of the league, the winner of the match have a smaller amount of wins than the loser of the match. A team is called astonishing if all its matches are unusual matches. Find the maximum number of astonishing teams.