Can you provide a proof for the following claim: >Let $P_m(x)=2^{-m}\cdot \left(\left(x-\sqrt{x^2-4})^m+(x+\sqrt{x^2-4}\right)^m\right)$ . Let $N= 4kp^n+1 $ such that $p$ is a prime number greater than $3$ , $k$ is an odd natural number , $3 \nmid k$ , $n\ge3$ and $4k <p^n$. Let $S_i=P_p(S_{i-1})$ with $S_0=P_{kp^2}(10)$, then $N$ is a prime iff $S_{n-2} \equiv 0 \pmod{N}$ . You can run this test [here][1]. I have verified this claim for $k \in [1,300]$ with $p \in [5,109]$ and $n \in [3,50]$ . [1]: https://sagecell.sagemath.org/?z=eJxtjrEKwjAURXe_onYoSRuxCTqlz8XJwSJ0F7SN9NE2CWmo-Pcmg7o4XLjvXA68AfbShuiQFT7ILh8qe9VJliX6IFgNAeQBFFw2cDYdEbk1Y9ur-2vu1ULiKBhnvNwKymoqW--Ay2ePoyKhV6A3gv1VbdCan1UApzJ80ACUzDrUnqQXh5Nap_RzH81kzYw-si886eU2Ypco7R2qOU7yDdQkQVg=&lang=gp&interacts=eJyLjgUAARUAuQ==