This question is cross-linked with Mathoverflow and I didn't get an answer for the question.
Here is what I observed :
Inspired by Lucas-Lehmer primality test, I think I made a primality test for numbers of the form $\frac{a^p-1}{a-1}$ but the test isn't perfect and there are some conditions to apply :
- $a$ must not be a perfect power otherwise you can get false positive.
- $p$ must be a prime number $\ge 3$ otherwise you can "break" the primality test and get false positive.
Let $N = \frac{a^p-1}{a-1}$
Let the sequence $S_i = 2 \cdot T_{a}(S_{i-1}/2)$ where $T_{n}(x)$ is the Chebyshev's polynomial of the first kind with $S_0 = p$.
$N$ is prime if $S_{p} \equiv 2 \cdot T_{a}(p/2)$ (mod $N$) or $S_{p} \equiv 2 \cdot T_{a-2}(p/2)$ (mod $N$)
You can run the test here
For the moment, I didn't find a counterexample with the two conditions.
I need help for proving it but I don't know how to start. If you found a counterexample please tell me.