If I understand correctly, this PARI method implements it:
Code:
LLFermat(m) = v=Mod(5,2^(2^m)+1);for(i=1,2^m-2,v=v^2-2);v==0
The way I understand Pépin's test, is:
Code:
Pepin(m) = v=Mod(3,2^(2^m)+1);for(i=1,2^m-1,v=v^2);v==-1
So it looks like they are equally good.
/JeppeSN