21. The answer is $\mathbf{( B )}$.

The number $n$ must be prime, so it can be equal to 2 or it must be an odd number. First, consider the case $n=2$; in this case $(n-6)^{2}+1=17$, which is prime. Therefore, $n=2$ provides a solution. Now consider the case where $n$ is odd. Note that $(n-6)$ is still odd, and thus $(n-6)^{2}$ is still odd, so $(n-6)^{2}+1$ is even and, being prime, must be equal to 2. Therefore, we must have: $(n-6)^{2}+1=2$ from which $(n-6)^{2}=1$ which is equivalent to $n-6= \pm 1$. This gives us the two values $n=7$ and $n=5$, both of which are acceptable as they are also prime. In total, there are then three possible $n$ that satisfy the required properties.

[Problem proposed by X.Y. Lu.]
21) For how many natural numbers $n$, both $n$ and $(n-6)^{2}+1$ are prime?
(A) 1, (B) 3
(D) 7 , (E) more than 8.