Prove that for all $a, b$ and $x_0$ positive integers, in the sequence $x_1, x_2, x_3, \cdots$ defined by $$x_{n+1}=ax_n+b, n\geq 0$$ Exist an $x_i$ that is not prime for some $i\geq 1$
Problem
Source: Mathematics Regional Olympiad of Mexico Southeast 2020 P6
Tags: number theory, prime numbers, Sequence
24.10.2021 02:47
25.10.2021 13:18
Let $x_1=p$ is prime and $y_i=(x_i \pmod {p})$ We have only finite numbers of values for $y_n$ so there are $i<j$ with $y_i=y_j$ But from $y_i=y_j$ follows that $y_{i-1}=y_{j-1}= (x_i-b) a^{-1} \pmod {p}$ and so $y_{j-i+1}=y_1=0$ but $x_{j-i+1}>x_1$ and $p|x_{j-i+1}$ so $x_{j-i+1}$ is not prime
23.11.2021 19:05
Its easy to prove by induction that $x_n=(x_1-b) \cdot a^{n-1}+b \sum_{k=0}^{n-1} a^k$ for $n \ge 1$ so now we will go by contradiction assuming that all $x_i$ are prime numbers for $i \ge 1$ then we get 2 cases. Case 1: $a \equiv 1 \pmod{x_1}$ Then by $n=x_1+1$ on the sequence and using mod $x_1$ we get: $$x_{x_1+1} \equiv 0 \pmod{x_1} \implies x_{x_1+1}=x_1$$Hence using the sequence formula and $x_1=ax_0+b$ we get: $$ax_0=x_0 \cdot a^{x_1+1}+b \sum_{k=1}^{x_1+1} a^k \; \text{by size reasons this is a contradiction!!}$$Case 2: $a \equiv 0 \pmod{x_1}$ Using mod $x_1$ and taking any $n \ge 1$ we will get $$x_n \equiv 0 \pmod{x_1} \implies x_n=x_1 \; \text{which means} \; x_i \; \text{is constant for} \; i \ge 1$$Now using the recurrency formula we get $x_n=\frac{b}{1-a}$ for $n \ge 1$ but since $a$ is a positive integer we have contradiction! Case 3: $a \not\equiv 0 \pmod{x_1}$ and $a \not\equiv 1 \pmod{x_1}$ On the sequence formula for $n=x_1$ we will use FLT with mod $x_1$ $$x_{x_1} \equiv 0 \pmod{x_1} \implies x_{x_1}=x_1$$Now using the sequence formula for $n=x_{x_1}$ and using $x_1=ax_0+b$ we get $$ax_0=x_0 \cdot a^{x_1}+b \sum_{k=1}^{x_1} a^k \; \text{which is a contradiction for size reasons}$$Since on all cases we got a contradiction we are done