34. Let $P(x)=a_{0}+a_{1} x+a_{2} x^{2}+\cdots+a_{n} x^{x}$ be a polynomial in $x$ where the coefficients $a_{0}, a_{1}, a_{2}, \ldots, a_{n}$ are non-negative integers. If $P(1)=25$ and $P(27)=1771769$, find the value of $a_{0}+2 a_{1}+3 a_{2}+\cdots+(n+1) a_{n}$.
34. Answer: 75
First we note that every positive integer $m$ can be written uniquely (in base 27 ) as
$$
m=b_{0}+b_{1} \times 27+b_{2} \times 27^{2}+\cdots+b_{r} \times 27^{r},
$$
where $r$ and $b_{0}, b_{1}, b_{2}, \ldots, b_{r}$ (depending on $m$ ) are non-negative integers with $b_{i}<27$ for $i=0,1,2, \ldots, r$.
Since the coefficients of $P(x)$ are non-negative integers and $P(1)=25$, we see that $a_{k} \leq 25<27$ for $0 \leq k \leq n$. Thus by the above remark, the polynomial $P(x)$ is uniquely determined by the value $P(27)=1771769$. Writing 1771769 in base 27 , we obtain $1771769=2+11 \times 27+9 \times 27^{3}+3 \times 27^{4}$. Therefore
$$
P(x)=2+11 x+9 x^{3}+3 x^{4} \text {. }
$$

Hence $a_{0}+2 a_{1}+3 a_{2}+\cdots+(n+1) a_{n}=2+2 \times 11+4 \times 9+5 \times 3=75$.