20. When $(1+x)^{38}$ is expanded in ascending powers of $x, N_{1}$ of the coefficients leave a remainder of 1 when divided by 3 , while $N_{2}$ of the coefficients leave a remainder of 2 when divided by 3 . Find $N_{1}-N_{2}$.
(2 marks)
當 $(1+x)^{38}$ 按 $x$ 的升幕序展開時, 其中 $N_{1}$ 個系數除以 3 時餘 $1 、 N_{2}$ 個系數除以 3 時餘 2 。求 $N_{1}-N_{2}$ 。
20. 4
20. Observe that for a prime power $p^{r}$ and $0<i<p^{r}$, the number
$$
C_{i}^{p^{r}}=\frac{p^{r}\left(p^{r}-1\right) \cdots\left(p^{r}-i+1\right)}{i(i-1) \cdots(3)(2)(1)}
$$
is always divisible by $p$ because the power of $p$ in the numerator is strictly greater than that in the denominator (as the number of multiples of $p^{r}$ is 1 in the numerator and 0 in the denominator, and the number of multiples of lower powers of $p$ in the numerator is at least equal to that in the denominator). In order words, we have $(1+x)^{p^{7}} \equiv 1+x^{p^{7}}(\bmod p)$ and so
$$
\begin{aligned}
(1+x)^{38} & =(1+x)^{27}(1+x)^{9}(1+x)^{2} \\
& \equiv\left(1+x^{27}\right)\left(1+x^{9}\right)\left(1+2 x+x^{2}\right) \\
& =\left(1+x^{9}+x^{27}+x^{36}\right)\left(1+2 x+x^{2}\right) \quad(\bmod 3)
\end{aligned}
$$

Upon expanding the two parentheses in the last row, we get 12 terms, 8 of which have coefficient 1 and 4 have coefficient 2 . It follows that $N_{1}-N_{2}=8-4=4$.

Remark. A more intuitive approach would be to construct a Pascal triangle (taken modulo 3). One could try to observe some pattern in the process (e.g. noting that both Row 3 and Row 9 are of the form $10 \ldots .01$ ) to reduce the amount of brute force needed.