Given a prime $\,p\,$ let's consider the following sequence:
$a_0=p$
$a_{n+1}=(a_n-2)\cdot a_n+2$
Is it possible to determine whether the sequence $\,a_n\,$ will reach, sooner or later, another prime number?
Some examples:
for $\,p=2$, $\;\;a_1=2\;\;$ (prime)
for $\,p=3$, $\;\;a_1=5\;\;$ (prime)
for $\,p=29$, $\;\;a_2=614657\;\;$ (prime)
for $\,p=31$, $\;\;a_5=185302018885184100000000000000000000000000000001\;\;$ (prime)
Many thanks.
[ Added ]
Experimental evidence shows that, up to 100, only for the following prime numbers $\,p\,$ the sequence $\,a_n\,$ should never reach another prime: $$13,19,23,43,53,59,61,71,73,79$$ In order to find out the possible divisors of $\,a_n=(p-1)^{2^n}+1\,$ (see the answer of GH from MO) the following result can be exploited:
the only prime divisors of $\,a_n\,$ are of the form $\,k\cdot2^{n+1}+1$.
Example: $$(13-1)^8+1=17\cdot97\cdot260753=(1\cdot2^4+1)\cdot(6\cdot2^4+1)\cdot(16297\cdot2^4+1)$$