Can you provide a proof or a counterexample for the following claim :

Let $P_m(x)=2^{-m}\cdot((x-\sqrt{x^2-4})^m+(x+\sqrt{x^2-4})^m)$ . Let $F_{p,n}= (2p)^{2^n}+1 $ where $p$ is a prime number greater than $5$ , and $n\ge2$ . Let $S_i=P_{2p}(S_{i-1})$ with $S_0=P_{p^2}(8)$ , then $$F_{p,n} \text{ is prime iff } S_{2^n-2} \equiv 0 \pmod{F_{p,n}}$$ .

You can run this test here . A list of generalized Fermat primes sorted by base can be found here . I have verified this claim for $p \in [7,5000]$ with $n \in [2,10]$ and there were no counterexamples .