18. For any positive integer $n$, let $f(n)=70+n^{2}$ and $g(n)$ be the H.C.F. of $f(n)$ and $f(n+1)$. Find the greatest possible value of $g(n)$.
(2 marks)
對任何正整數 $n$, 設 $f(n)=70+n^{2}$, 而 $g(n)$ 則是 $f(n)$ 與 $f(n+1)$ 的最大公因數。求 $g(n)$ 的最大可能值。
18. 281
18. We use $(m, n)$ to denote the H.C.F. of $m$ and $n$. Using the facts that $(m, n)=(m, n+k m)$ for any integer $k$ and $(m, n)=(2 m, n)$ if $n$ is odd, we have
$$
\begin{aligned}
g(n) & =(f(n), f(n+1))=\left(70+n^{2}, 70+(n+1)^{2}\right) \\
& =\left(70+n^{2}, 2 n+1\right)=\left(140+2 n^{2}, 2 n+1\right) \\
& =(140-n, 2 n+1)=(280-2 n, 2 n+1) \\
& =(281,2 n+1) \\
& \leq 281
\end{aligned}
$$

Hence the largest possible value of $g(n)$ is 281 . Finally, 281 is indeed attainable because $f(140)=70+140^{2}=281 \times 70$ while $f(141)=70+141^{2}=281 \times 71$. It follows that the answer is 281.