next up previous
Next: Up: Previous:

Pseudo

Z+ = nonzero elements of Zn = {1, 2, $\ldots$, n-1}.

By Fermat's Theorem, if n is prime, then \(a^{n-1} \;\equiv\; 1 (mod \;n)\) for every \(a \;\in\; Z_n^+\).

If some a violates, then n is composite.


next up previous
Next: Up: Previous: