0% found this document useful (0 votes)
17 views3 pages

Fermat and Euler Theorem

Uploaded by

sanjaiv.ug.21.cs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views3 pages

Fermat and Euler Theorem

Uploaded by

sanjaiv.ug.21.cs
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Fermat’s Theorem:

If p is prime and a is a positive integer not divisible by p, then

a p-1 ≡ (1 mod p)

Proof:

Consider a set of positive integers less than p:{1,2,3…..p-1} and multiply each element by

a mod p, to get a set X={a mod p,2a modp,3a mod p,……(p-1)a modp}

None of the elements of X is equal to zero, because p does not divide a.

No two of the integers in X are equal.

To see this, assume that ja ≡ ka (mod p),where 1≤j<k ≤ p-1.

Because a is relatively prime to p, we can eliminate a from both sides, resulting in j ≡ k (mod p)

This last equality is impossible, because j and k are both positive integers less than p.

Therefore we know that the p-1 elements of X are all positive integers with no two elements equal.

We can conclude the X consists of the set of integers :{1,2,3…..p-1}in some order.

Multiplying the numbers in both sets (p and X) and take the results mod p yield

a x 2a x 3a……(p-1)a ≡ [(1x2x3……(p-1)](mod p)

a p-1(p-1)! ≡(p-1)! (mod p)

a p-1 ≡ (1 mod p)

Eg: a= 7, p = 19

a p-1 ≡ (1 mod p)

7 19-1 =718

72 =7x7=49 (mod 19)=11

74 = 72 x 72 = 11 x 11 =121 mod 19=7

78 = 74 x 74 = 7 x 7=49 (mod 19)=11

716 = 78 x 78 = 11 x 11=121 mod 19=7

718 =716 x 72 =7 x 11 =77 mod 19 = 1

An alternative form of fermat’s theorem, If p is prime and a is a positive integer,then

a p ≡ (a mod p)

eg: p=5,a=3
a p =35 =243 mod 5 =3

Euler‘s totient function ɸ

Euler’s totient function is represented as Φ(n),the number of positive integers less than n and
relatively prime to n. Φ(n)=1.

Φ(n) = n-1

Φ(1) = 1

Φ(2) = 1

Φ(3)= {1,2}=2

Φ(4) = {1 ,3}=2

Φ(5) = {1,2,3,4}=4

Φ(6) = {1 ,5} =2

Φ(7) = {1,2,3,4,5,6} =6

Φ(8) = {1,3,5,7} =4

Φ(9) = {1,2 4,5,7,8}=6

Φ(10) ={1 ,3, 7 ,9}=4

Φ(11) = {1,2,3,4,5,6,7,8,9,10}=10

Φ(12) ={1, 5, 7, 11}= 4

Φ(13) ={1,2,3,4,5,6,7,8,9,10,11,12}=12

Φ(14) ={1, 3, 5,9, 11,13}=6

Φ(15) ={1,2, 4, 7,8, 11, 13,14}=8

Euler‘s Theorem

• Euler’s theorem states that for every a and n that are relatively prime:

aΦ(n) ≡ 1(mod n) 1

Proof:

Eq.1 is true if n is prime, because in that case, Φ(n) = n-1 and Fermat’s theorem holds. However it
also holds for any integer n. Recall that Φ(n) is the number of positive integers less than n that are
relatively prime to n.

Consider the set of such integers,

R={x1, x2,…….. x Φ(n)}

That is,each element xi of R is a Unique positive integer less than n with gcd(xi, n)=1.
Now Multiply each element by a modulo n:

S ={( ax1modn), (ax2modn),…….. (ax Φ(n)modn)}

The set S is a permutation of R,

1.Because a is relatively prime to n and xi is relatively prime to n, axi must also be relatively prime
to n.Thus all the members of S are integers that are less than n and that are relatively prime to n

2.There are no duplicate in S.If aximodn= axjmodn, then xi = xj

Therefore,

i=1(n) aximodn = i=1(n) xi

i=1(n) axi = i=1(n) ximodn

aΦ(n) i=1(n) xi =i=1(n) ximodn

aΦ(n) ≡ 1(mod n)

eg: a= 3;n=10

a Φ(n) ≡ 1(mod n)

3 Φ(n) =3 Φ(10)
Φ(10)
={1, 3, 7, 9}

=4

3 4 = 81 mod 10 =1

You might also like