10. Determine all integers $n$ for which $2 n^{3}-3 n^{2}+n+3$ is a prime number.
SOLUTION. We will show that the only integers satisfying the problem are $n=0$ and $n=1$.

First, let's rearrange the expression $V=2 n^{3}-3 n^{2}+n+3$ as follows:

$V=\left(n^{3}-3 n^{2}+2 n\right)+\left(n^{3}-n\right)+3=(n-2)(n-1) n+(n-1) n(n+1)+3$.

Both products $(n-2)(n-1) n$ and $(n-1) n(n+1)$ in the rearranged expression $V$ are divisible by three for any integer $n$ (in both cases, they are the product of three consecutive integers), so the expression $V$ is divisible by three for all integers $n$. The value of the expression $V$ is a prime number if and only if $V=3$, which is the case if and only if the sum of the two mentioned products is zero:

$0=(n-2)(n-1) n+(n-1) n(n+1)=n(n-1)[(n-2)+(n+1)]=n(n-1)(2 n-1)$

However, the last condition is satisfied by only two integers $n$, namely $n=0$ and $n=1$. This solves the problem.

Note. The fact that the expression $V$ is divisible by three for any integer $n$ can also be derived by substituting $n=3 k, n=3 k+1$, and $n=3 k+2$ into it, where $k$ is an integer, thus dividing all integers $n$ into three groups based on the remainder they give when divided by three.

GUIDING AND SUPPLEMENTARY PROBLEMS: