## Task B-4.3.

A sequence of numbers is defined by $a_{n}=n^{4}-360 n^{2}+400$. Calculate the sum of all terms of this sequence that are prime numbers.
## Solution.

The general term can be expressed in the following form:

$$
\begin{aligned}
a_{n} & =n^{4}-360 n^{2}+400=\left(n^{4}+40 n^{2}+400\right)-400 n^{2} \\
& =\left(n^{2}+20\right)^{2}-(20 n)^{2}=\left(n^{2}-20 n+20\right)\left(n^{2}+20 n+20\right)
\end{aligned}
$$

This expression will be a prime number only if one of the parentheses is equal to one for some natural number $n$, and the other is equal to some prime number for the same $n$.

If $n^{2}-20 n+20=1$, then $n^{2}-20 n+19=0$. This equation has two positive solutions, $n=1$ and $n=19$.

For $n=1$, the expression $n^{2}+20 n+20=1+20+20=41$, which is a prime number.

For $n=19$, the expression $n^{2}+20 n+20=19^{2}+20 \cdot 19+20=761$, which is a prime number.

If $n^{2}+20 n+20=1$, then $n^{2}+20 n+19=0$. This equation has negative solutions, so the only prime terms in the sequence are 41 and 761. Their sum is 802.

1 point