Problem

Source: New Zealand MO 2020 Round 1 p8

Tags: algebra, Sequence, recurrence relation, number theory



For a positive integer $x$, define a sequence $a_0, a_1, a_2, . . .$ according to the following rules: $a_0 = 1$, $a_1 = x + 1$ and $$a_{n+2} = xa_{n+1} - a_n$$for all $n \ge 0$. Prove that there exist infinitely many positive integers x such that this sequence does not contain a prime number.