1. Let $Q$ be a polynomial
$$
Q(x)=a_{0}+a_{1} x+\cdots+a_{n} x^{n},
$$
where $a_{0}, \ldots, a_{n}$ are nonnegative integers. Given that $Q(1)=4$ and $Q(5)=152$, find $Q(6)$.
Answer: 254 Since each $a_{i}$ is a nonnegative integer, $152=Q(5) \equiv a_{0}(\bmod 5)$ and $Q(1)=4 \Longrightarrow$ $a_{i} \leq 4$ for each $i$. Thus, $a_{0}=2$. Also, since $5^{4}>152=Q(5), a_{4}, a_{5}, \ldots, a_{n}=0$.
Now we simply need to solve the system of equations
$$
\begin{aligned}
5 a_{1}+5^{2} a_{2}^{2}+5^{3} a_{3}^{3} & =150 \\
a_{1}+a_{2}+a_{3} & =2
\end{aligned}
$$
to get
$$
a_{2}+6 a_{3}=7 \text {. }
$$

Since $a_{2}$ and $a_{3}$ are nonnegative integers, $a_{2}=1, a_{3}=1$, and $a_{1}=0$. Therefore, $Q(6)=6^{3}+6^{2}+2=$ 254.