Quote:
Originally Posted by R. Gerbicz
Wagstaff numbers are pretty special cyclotomic numbers, these are polcyclo(2*p,2)=(2^p+1)/3.
There is no known fast tests (at speed of LL test), though there could be! Note that here for example polcyclo(p,2)=2^p1 and we have the LL test for these.
This is a same/similar problem to find a test for repunits, (10^p1)/9 because those are polcyclo(p,10).

For the repunits test. I use T(q)={Wq=(10^q1)/9;S0=q^10;S=S0;print("q= ",q);for(i=1,q1,S=Mod(S^10,Wq));if(S==S0,print("prime"))}
forprime(n=3,1050,T(n)) on Pari Gp and I found for q prime : 3, 19, 23, 317, 1031,
3 is obviously wrong but the other prime seems to be ok.
I think this test works for (n^p1)/(n1) when p>n (to eliminate 3 for example) but of course this is just an intuition.