Can you give a counterexample to the conjecture given below ?
Def 1.
Let $P_m(x)=2^{-m}\cdot \left(\left(x-\sqrt{x^2-4}\right)^{m}+\left(x+\sqrt{x^2-4}\right)^{m}\right)$ .
Def 2.
Let $N=k \cdot b^n-1$ such that $k>0$ , $3 \not\mid k$ , $b>0$ , $b$ is even number, $3 \not\mid b$ and $n > 2$ .
Def 3.
Let $S_i=P_b(S_{i-1})$ with $S_0=P_{kb/2}(P_{b/2}(4))$
Conjecture
If $N$ is prime then $S_{n-2} \equiv 0\pmod{N}$.
You can run this test here .