
Wilson theorem
Hi everybody,
First of all thank you for your time and your help.
I am looking on wilson theorem and i find this:
(p1)! = 1 (mod p) iif p is prime.
I have nowhere find this:
(p1)! = (p1) (mod p) iif p is prime.
Why the first notation is used???

It really all depends on what you know at this point, there are a ton of proofs of this. I think the most elementary way is by noticing that is a field. In particular the nonzero elements form a group under multiplication. Inverses are unique, so when you look at
you are just left with the product of things that are their own inverse. That is the things such that , this is clearly 1 and (mod p).
Thus (mod p).
The converse is trivial because if when n is composite, say n=jk. Then (p1)!=0 because j and k are zero divisors.

First of all thank you for your time.
Indeed if you use ring theory with desired properties (ex. inverting elements), yes you have the desired result.
However here my objection comes. Why we use not real models and properties to show the simple logic? There is not negative modulo between integers. Also there are no identical integer inverses into real world.
When i first noticed wilson theorem (use for a computer algorithm) I totaly confuded.
I had to look at other theories that have other axioms than these we sense.
Anyway thank you again.

I am not entirely sure I follow what you mean? There are an infinite number of negative numbers congruent to any of the least positive residues. And as far as not using modular arithmetic in the "real world", I gotta say I disagree with you. We use modular arithmetic all the time in the real world. Ever look at the clock? It is mod 12.
I am kind of interested in what computer algorithm you encountered that used Wilson's Theorem. I have seen it come up in some pretty strange places, and it amazes me when such a seemingly arbitrary relation is so useful. I recall once getting it out of the class equation or Sylow Theorem, I forget now. It came out of some Galois Theory stuff I was doing too this semester.

I work on prime numbers detection (for my own interest) via computer algorithm.
As soon i have something interesting i type it in this forum.
Because i need it for furter use, i am trying to aproach defferently wilson's theorem.
i focus in the following tecnique:
I try to relate the patterns (pn)! % p together.
I noticed that (p2) % p = 1 (this implied also from your answer)
p is prime, % is modulo
Anyway if i have something interesting i type it.
Thanks again

I assume you meant ! % p. But yes, that is also true, in fact I remember when I first learned Wilson's Theorem in number theory, I was surprised this was not the way it was stated as it seems much nicer to get 1 than 1.
I do not know how much background you have in number theory, but I suggest investigating Quadratic Reciprocity some, it may prove useful for you in your work. Wikipedia has a pretty lengthy article on this and lots of fascinating results with primes. Quadratic reciprocity  Wikipedia, the free encyclopedia
Take care.


Also check the following:
(p1)!/a % p != (p1)!/b % p
a, b <p, % modulo, p prime, != inequality.
I encountered this is in factorization of Zeta fucntion!

Give you more info when i am more certain for something

Sorry i also forgotten:
Sum[(p1)!/n {n,1,p1}] % p = 0
Test it. Proof is easy for this (by using reciprocals on adding first and last terms)