## Task 24/83

Let $p_{1}$ and $p_{2}$ be two consecutive prime numbers with $p_{1}<p_{2}$ and $f(x)$ a polynomial of degree $n$ in $x$ with integer coefficients $a_{i}(i=0 ; 1 ; 2 ; \ldots ; n)$. Determine $p_{1}$ and $p_{2}$ from $f\left(p_{1}\right)=1234$ and $f\left(p_{2}\right)=4321$.
From $f(x)=\sum_{i=0}^{n} a_{i} x^{i}$ it follows that

$$
f\left(p_{2}\right)-f\left(p_{1}\right)=\sum_{i=0}^{n} a_{i} p_{2}^{i}-\sum_{i=0}^{n} a_{i} p_{1}^{i}=\sum_{i=0}^{n} a_{i}\left(p_{2}^{i}-p_{1}^{i}\right)=4321-1234=3087
$$

It is always true that $a^{k}-b^{k}$ is divisible by $a-b$ (the proof follows immediately from

$$
(a-b) \sum_{i=0}^{k-1} a^{k-1-i} b^{i}=a^{k}-b^{k}
$$

by expanding); consequently, $p_{2}^{i}-p_{1}^{i}$ and thus

$$
\sum_{i=0}^{n} a_{i}\left(p_{2}^{i}-p_{1}^{i}\right)=3087
$$

is divisible by $p_{2}-p_{1}$. Since an odd number is never divisible by an even number, it follows that $p_{2}-p_{1}$ is odd.

Therefore, $p_{1}$ and $p_{2}$ cannot both be odd. The only remaining possibility is $p_{1}=2$ (since $p_{1}<p_{2}$) and $p_{2}=3$ ($p_{1}$ and $p_{2}$ are consecutive prime numbers).