micromass said:
Have you seen Wilson's theorem? This states that (p-1)!=-1 (mod p) for prime p.
Can you adjust the proof so that it also works in this case?
I have tried, but fail in the last step:
In Wilson's proof, the number satisfy a^2=1(mod p) -> (a-1)(a+1) = p*n. Since 0<=a<p
a= 1 or p-1 only. So for 2,3,...,p-2, I can group them into pairs without repeat such that the pair product = 1 (mod p)...
But in my problem, the number satisfy a^2=1(mod m) does not imply a=1 or m-1 since m is a composite number. (e.g. 3^2=1(mod 8))
I also modify my proof. Consider B^2=b1^2*b2^2*...bn^2. I have showed that for each bi, there exist unique bj such that bi*bj=1 (mod m) (similar to Wilson’s proof). Although we don't know bi is equal to bj or not.
So I divide the number into 2 groups,
1st group: bi*bj=1 (mod m) for i <>j
2nd group: bi*bj=1 (mod m) for i = j
So B^2 = 1 (mod m) but the same problem occurs,
It cannot be concluded that B= 1 or -1(mod m)