Find all pairs of positive integers, such that the sequence defined by , and
has only finite number of composite terms.
Solution
Suppose firstly that there exists a such that . Then by induction we have for all (when taking out the modulus the expression does not change sign) and so for all . Solving the characteristic equation implies that
Since the sequence is strictly increasing, we must have and in particular any prime divisor of some will also be a prime divisor of for any as by Fermat's Little theorem. In particular, infinitely many terms would be composite.
Therefore for all . Since , we must have where is a prime for all with some positive integer . Thus
The former case gives us which indeed satisfies the condition. Let's consider the latter case: , so we can find out that . We consider some cases:
* If there is no , then are the first two terms.
* If is divisible by , thus , , or , which implies being not integer.
So, finally we get where is any prime.