\documentclass[11pt]{scrartcl}
\usepackage{evan}

\begin{document}
\title{Iberoamerican 2019/2}
\subtitle{Evan Chen}
\author{Twitch Solves ISL}
\date{Episode 109}
\maketitle

\section*{Problem}
Determine all polynomials $P(x)$ with degree $n\geq 1$
and integer coefficients so that for every real number $x$,
\[ P(x)=(x-P(0))(x-P(1))(x-P(2))\dotsm (x-P(n-1)). \]

\section*{Video}
\href{https://www.youtube.com/watch?v=_91OtUwJMjQ&list=PLi6h8GM1FA6yHh4gDk_ZYezmncU1EJUmZ}{\texttt{https://youtu.be/\_91OtUwJMjQ}}

\section*{External Link}
\url{https://aops.com/community/p13131585}

\newpage

\section*{Solution}
The answer is $P(x) = x$ only.

For $n = 1$ it's easy to check that $P(x) = x$ is the only solution.
We prove there are no others.
\begin{claim*}
  If $n > 1$, any potential solution would need to have $P(0)=0$.
\end{claim*}
\begin{proof}
  If not, plug in $x=0$ and cancel $P(0)$ to get
  \[ 1 = (-1)^n P(1) P(2) \dots P(n-1). \]
  So we'd need to have $P(k) = \pm1$ for $k=1,\dots,n-1$.
  However, $P(1) \neq 0$, so actually $P(k) = -1$ for $k=1,\dots,n-1$.
  In other words $P(x) = x(x+1)^{n-1}$, which doesn't work for $n \ge 2$.
\end{proof}

We manually bash $n=2$ now: if $P(x) = x^2 + bx$ then we'd need
$P(x) = x^2 + bx = (x-0)(x-(1+b))$, which is impossible.

Now assume $n \ge 3$.
\begin{claim*}
  For $k = 3, 4, \dots, n-1$, any potential solution would have $P(k) = 0$.
\end{claim*}
\begin{proof}
Note that by plugging in $k$, we get
\[ P(k) = k \cdot (k-P(k)) \cdot T_k \]
for some integer $T_k$
(namely $T_k = \prod_{\substack{1 \le i \le n-1 \\ i \neq k}} (k-P(i))$,
but we don't need the actual value).
This rearranges to
\[ (1+kT_k) P(k) = k^2T_k. \]
However, $1 + kT_k$ shares no factors with $k^2 T_k$.
So this can only occur if $1 + kT_k \in \{-1,1\}$ or $T_k = 0$.
For $k \ge 3$, we extract $P(k) = 0$.
\end{proof}

Now, we are left with $P(x) = x(x-P(1))(x-P(2)) x^{n-3}$.
So plug in $x=1$ and $x=2$:
\begin{align*}
  P(1) &= (1-P(1)) (1-P(2)) \\
  P(2) &= 2(2-P(1)) (2-P(2)) \cdot 2^{n-3}.
\end{align*}
Solve to get $P(1) = \frac{2(2^n-2)}{2^n-8}$
and $P(2) = \frac{3 \cdot 2^n}{2^n+4}$.
This means $n \neq 3$, and for $n > 3$ we have $2^n+4 \nmid 3 \cdot 2^n$
(since $2^n + 4 \nmid -12$), so there are no other solutions.

\end{document}
