TITLE: Non-existence of a prime generating polynomial recurrence relation
QUESTION [6 upvotes]: Let $f\in \mathbb{Q} [x]$ be a polynomial, and $a_0 = a$ be an arbitrary integer. Let us define a sequence $\{a_n \} $ by the recurrence relationship : $$a_n = f(a_{n-1} ). $$ I want to show that $a_n $ cannot always be a prime number, with $\{a_n \}$ being pairwise distinct. I am pretty sure that this is a very well known fact, but I cannot easily find this.
Note : I posted this question also in SE Math. 
https://math.stackexchange.com/questions/1568513/non-existence-of-a-prime-generating-polynomial-recurrence-relation

REPLY [13 votes]: Let $a_0 = 2^{2^k} + 1$ for $k$ sufficiently large, and let
$$a_n = (a_{n-1} - 1)^2 + 1.$$
Then $a_n = 2^{2^{k+n}} + 1$, so this sequence can't always be prime regardless of the value of $k$ iff there are infinitely many composite Fermat numbers, and as far as I know this is wide open.