Fermat's little theorem inverse yuan

Fermat's little theorem inverse yuan

Fermat's Little Theorem

What is Fermat's Little Theorem?
Here (currently no recommended blog)
after inversion because the focus is yuan by Fermat's Little Theorem, rather than talking about what Fermat's little theorem is, so do not go into details, please know what is Fermat's little theorem to see this blog.
Only briefly mention what Fermat's little theorem is:
\ [A-P. 1 ^ {} \ equiv. 1 \ PMOD {m} \]

What is the inverse

As we all know, there is no way to the modulo operation with the division, so how the division has become a problem, and this time inverse appeared, a number multiplied by the number and then under a number of analog% this sense in the sense die the answer is 1, then the inverse 'a number' is this number.
Can replace the inverse divider, dividing this number is equal to the number multiplied by the inverse element.

How inversion yuan with Fermat's Little Theorem

Ma Theorem fee by the above formula can be obtained:
\ [A \ Times A-P ^ {2} \ equiv. 1 \ PMOD {P} \]
Therefore:
\ (A \) in the mold \ (P \) Significance underride in \ (a ^ {p-2 } \) is equal to \ (1 \) , which fit the above definition of the inverse element, so \ (a ^ {p-2 } \) is \ (a \) of the inverse element

Fermat's little theorem seeking inverse of limitations

Because Fermat's little theorem applies only to the case of the modulus is a prime number, we can only solve the inverse modulus is in a prime case, but in most of the title is still very useful, after all, it is the simplest thing.

Guess you like

Origin www.cnblogs.com/acioi/p/11736379.html