Generalized repunit pseudoprime construction
ID: generalized-repunit-pseudoprime-construction
Fix an integer and an odd prime not dividing . Thenis a composite number that is a Fermat pseudoprime to base .
For compositeness, factorBoth factors are integers because is odd, and both exceed one for and . Also , so is coprime to .
By Fermat's little theorem, . Since is invertible modulo , this gives . The displayed sum is odd for either parity of , so . Finally , and raising this identity to the integer power proves .
New to topics? Read the docs here!