## Task 16/88

Let $P(x)$ be a polynomial of degree n, which leaves a remainder of 1 when divided by $(x-1)$, a remainder of 2 when divided by $(x-2)$, and a remainder of 3 when divided by $(x-3)$.

What remainder does it leave when divided by $(x-1)(x-2)(x-3)$?
According to the problem statement, for $i=1; 2; 3$

$$
P(x)=(x-i) Q_{i}(x)+i
$$

where the $Q_{i}(x)$ are polynomials of degree $n-1$. For $x=i$, it follows that $P(i)=i$. On the other hand,

$$
P(x)=(x-1)(x-2)(x-3) Q(x)+R(x)
$$

where $Q(x)$ is a polynomial of degree $n-3$ and $R(x)$ is a polynomial of at most degree 2. Substituting $x=i$ into this, since for each $i$ one factor becomes zero, we get $P(i)=R(i)$. Therefore, $R(i)=i: R(1)=1, R(2)=2, R(3)=3$.

Since $R(x)$ is of at most degree 2, we make the assumption $R(x)=a_{2} x^{2}+a_{1} x+a_{0}$ with $x=1; 2; 3$ (if one does not recognize that $R(x)=x$ provides these values):

$$
a_{2}+a_{1}+a_{0}=1 ; \quad 4 a_{2}+2 a_{1}+a_{0}=2 ; \quad 9 a_{2}+3 a_{1}+a_{0}=3
$$

The solution to this system of equations yields $a_{2}=a_{0}=0, a_{1}=1$.

Thus, $R(x)=x$ is the desired remainder.