Is it true or false that for any odd prime the following exists:
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
We first put some order in this messy equation and exploit the fact that p + n ≡ n m o d p :
A ( p ) = 1 2 × 3 2 × . . . × ( p − 2 ) 2 = 1 × ( p − 2 ) × 3 × ( p − 4 ) × . . . × ( p − ( p − 1 ) ) ≡ 1 × ( − 2 ) × 3 × ( − 4 ) × . . . × ( p − 2 ) × ( − ( p − 1 ) ) m o d p
Which means that if there is an odd number of even numbers then A ( p ) = − ( p − 1 ) ! and if there is an even number of even numbers then A ( p ) = ( p − 1 ) !
According to Wilson's theorem : ( n − 1 ) ! ≡ − 1 m o d n if and only if n is prime.
And what a coincidence because we do have a prime number !!
The rest is easy. There are two cases : either you have an even number of even numbers or an odd number of even numbers. You just have to study the two scenarios with m o d 4 ...
Thank you for the problem ! It taught me Wilson's theorem which is quite a powerful tool.