Analysis of information sources in references of the Wikipedia article "Fermat primality test" in English language version.
There are (at least) 5 PRP residue types for testing N=(k*b^n+c)/d: (1) Fermat PRP. Calculate a^(N-1) mod N. PRP if result = 1. (2) SPRP variant. Calculate a^((N-1)/2) mod N. PRP if result = +/-1. (3) Type 1 variant,b=2,d=1. Calculate a^(N-c) mod N. PRP if result = a^-(c-1). (4) Type 2 variant,b=2,d=1. Calculate a^((N-c)/2) mod N. PRP if result = +/-a^-((c-1)/2). (5) Cofactor variant. Calculate a^(N*d-1) mod N*d. PRP if result = a^(d-1) mod N.