8. Given $(\sqrt{2}+1)^{21}=a+b \sqrt{2}$, where $a, b$ are positive integers. Then $(b, 27)=$ $\qquad$
8. 1 .

Notice,
$$
\begin{array}{l}
(\sqrt{2}+1)^{21} \\
=(\sqrt{2})^{21}+\mathrm{C}_{21}^{1}(\sqrt{2})^{20}+\mathrm{C}_{21}^{2}(\sqrt{2})^{19}+\cdots+ \\
\mathrm{C}_{21}^{20} \sqrt{2}+\mathrm{C}_{21}^{21}, \\
(\sqrt{2}-1)^{21} \\
=(\sqrt{2})^{21}-\mathrm{C}_{21}^{1}(\sqrt{2})^{20}+\mathrm{C}_{21}^{2}(\sqrt{2})^{19}-\cdots+ \\
\quad \mathrm{C}_{2 \mathrm{~N}}^{20}-\mathrm{C}_{21}^{21} .
\end{array}
$$

Therefore, $(\sqrt{2}-1)^{21}=-a+b \sqrt{2}$.
Thus, $2 b^{2}-a^{2}=1$.
If $b \equiv 0(\bmod 3)$, then $a^{2} \equiv-1(\bmod 3)$.
This contradicts $a^{2} \equiv 0,1(\bmod 3)$.
Therefore, $(27, b)=1$.