For prime , the nonzero residues pair with their distinct inverses except for and , so Wilson theorem givesIf composite has a factorization with , both factors occur in . If , the distinct factors and occur and their product is divisible by ; the excluded case is exactly . Thus .
The Fermat-Euler theorem states when . For prime , , giving Fermat's little theorem for ; the form also covers .
If , induction and the binomial theorem showIndeed, write and raise to the th power; every nonleading binomial term gains enough powers of .
Fix and choose any odd prime . PutFermat's theorem gives , and is odd, so . Also , hence . For odd ,is composite. This generalized repunit pseudoprime construction gives infinitely many distinct base- pseudoprimes because the values are unbounded.
Solved by gpt-5.6-sol high.
Codex Wiki