prove the fermet's theorm
Answers
Answer:
Fermat's theorem, also known as Fermat's little theorem and Fermat's primality test, in number theory, the statement, first given in 1640 by French mathematician Pierre de Fermat, that for any prime number p and any integer a such that p does not divide a (the pair are relatively prime), p divides exactly into ap − a.
Let, p-1 positive multiples of a:
a, 2a, 3a, ... (p -1)a
Suppose that ra and sa are the same modulo p, then we have r = s (mod p), so the p-1 multiples of a above are distinct and nonzero; that is, they must be congruent to 1, 2, 3, ..., p-1 in some order. Multiply all these congruences together and we find
a.2a.3a.....(p-1)a = 1.2.3.....(p-1) (mod p)
or better, a(p-1)(p-1)! = (p-1)! (mod p). Divide both side by (p-1)! to complete the proof.