# A sequence is defined by the nth term: $n^3 -21n^2 +99n +121$. What primes does the sequence contain if continued to infinity? [closed]

A sequence is defined by the nth term: $$n^3 -21n^2 +99n +121$$

What primes does the sequence contain if continued to infinity?

(Question given by maths teacher in stretch and challenge workshop)

• Think of some way to factorize the expression
– PNT
May 7 at 20:32
• $n^3 - 21n^2 + 99n + 121 = (n+1)(n-11)^2$
– Alan
May 7 at 20:33

Note that $$a_n=n^3−21n^2+99n+121=\left(n+1\right)\left(n-11\right)^2$$ And for $$n\ge 13$$ both $$n+1$$ and $$(n-11)^2$$ are $$>1$$ so $$a_n$$ is not a prime for $$n\ge 13$$.
Now you just want to check $$n\le 12$$ and see what primes the sequence gives.
• As a further hint to OP: Since $a_n$ can be factored into two components, in order to be prime, one of them must equal $1$. One of the components is a square, so that must be the component that equals $1$. $(n-11)^2=1 \Rightarrow n-11= \pm 1$ May 7 at 20:59