Exercise 1130Number theory › PrimesL1Added 3 Nov 2026
Fermat primality test
#Fermat test#primality#witness
Statement
Test whether is prime using the Fermat test with base .
Hint
Compute . If , is composite.
Show solutionHide solution
Solution
Compute. , , , , , .
Result. .
Conclusion. is composite (as expected: ).