Showing posts with label totient. Show all posts
Showing posts with label totient. Show all posts

Saturday, 18 May 2013

Euler-Fermat Theory and Prime-testing

As mentioned in the last post, Euler-Fermat's Theory states that for any element m in a group:
$m^{\varphi(n)} = 1 \text{ mod } n$
where $\varphi(n)$ is the totient of n.
The totient of a number is simply the number of Integers that are smaller, and coprime (i.e. no common factors).

This allows us to come up with a simple (though not foolproof) test for prime numbers.
If n is a prime number p, then the number of smaller Integers that are coprime, are all of them. Thus $\varphi(p) = p-1$ for a prime number, and $m^{(p-1)} = 1 \text{ mod } p$ should be true for all the numbers m, smaller than p.

Lagrange's Theory of Finite Groups and the Euler-Fermat Theorem.

In my Group Theory post, I stated that once a Set of mathematical elements and a mathematical operation have been proven to satisfy some basic properties, all theories, proofs and facts from the mathematical discipline of Group Theory, would automatically apply.

 Lagrange's Theory of Finite Groups states that any group can only be divided up into subgroups of the same size.

Euler-Fermat's Theorem is an application of this, that says that any number (coprime to n), rasied to a special power (called the totient of n) will give 1 mod n.

The coprime and totient properties of the second theory are a consequence of the structure of the Multiplicative Group of Integers Modulo n.