Curious3141
Homework Helper
- 2,861
- 89
ehild said:You can define addition and multiplication on the remainders. In case of mod5,
1+1=2, 2+2=4, 4+1=0, 4+2=1, 4+3=2, 4+4=3...
You can define zero (as x+0=x) and negative. -x is defined as the element which added to x, gives 0. This way (4) (mod5)+1(mod5)=0 →(-1)(mod5)≡4(mod)5.
You can define unit and multiplication. 1*x=x
2*2=4 (or -1), 2*3=1, 2*4=3,(or-2) 3*3=4,(or-1) 3*4=2, 4*4=1.
You can also define reciprocal of x: x-1: x*x-1=1
1-1=1 as 1*1=1
2-1=3 as 2*3=1
3-1=2 as 3*2=1
4-1=4 as 4*4=1
Each element has a unique reciprocal, except zero. The reciprocal of both 1 and (-1) are themselves.
The remainders of a prime are 0, 1, 2,..., p-1. Except zero, all element have reciprocals. So p-1! can be grouped as the product of the elements with its reciprocals except the first and last ones. If p=5 5!=(1) (2*3)*(4)=1*1*(4)≡(-1)
For p=7, 2*4=1(mod7), 3*5=1, 6*6=1. So 2-1=4, 3-1=5, 4-1=2, 5-1=3, 6-1=6 (or -1)
6!=(1)*(2*4)*(3*5)*(6) = 1*1*1*(-1)
For p prime, p-1 is even. The elements different from 1 and p-1 can be paired so as their product is 1. So p-1!=(p-1) (modp) that is (-1)(modp). (Wilson's Theorem).
28!=-1(mod29)
28!=25!*26*27*28.
28=(-1)(mod29), 27=(-2)(mod29), 26=(-3)(mod29)
28!=25!*(-1)*(-2)*(-3)=-1: 25!=6-1 (mod29)
6-1=5 (mod29) as 5*6=30=1+29
Therefore 25!=5(mod29).
ehild
Very complete, and very patient of you!
I wish I had the time/patience to type all that out.