If p is an odd prime, prove that 1^2 * 3^2 * 5^2 * ...(p-2)^2 = (-1)^(p+1)/2 (mod p)

and

2^2 * 4^2 * 6^2 * ... (p-1)^2 = (-1)^(p+1)/2 (mod p)

I know that (p-1)! = -1 mod p using Wilson's theorem, but then I am stuck. Help?

- Oct 2nd 2009, 05:56 PMkeityoProve that if p is an odd prime, 1^2 * 3^2 ...(p-2)^2 = (-1)^(p+1)/2 (mod p)
If p is an odd prime, prove that 1^2 * 3^2 * 5^2 * ...(p-2)^2 = (-1)^(p+1)/2 (mod p)

and

2^2 * 4^2 * 6^2 * ... (p-1)^2 = (-1)^(p+1)/2 (mod p)

I know that (p-1)! = -1 mod p using Wilson's theorem, but then I am stuck. Help? - Oct 2nd 2009, 07:18 PMBruno J.
For the first one : first, notice that are all the squares in . The squares of , by Euler's criterion, are the roots of the polynomial . Therefore, since is a unique factorization domain, we can factor this polynomial as :

Equating the constant terms, you get the theorem.

The second one is exactly the same. - Oct 2nd 2009, 09:09 PMkeityo
Very interesting information. The problem is that I haven't learned Euler's criterion in class yet, so I don't really understand your solution. I do know how to manipulate mods, use Wilson's Theorem, and Euler's generalization of Fermat's little theorem. Is there another way using only basic modular arithmetic and congruence to prove that 1^2 * 3^2 * 5^2 * ...(p-2)^2 = (-1)^(p+1)/2 (mod p) and 2^2 * 4^2 * 6^2 * ... (p-1)^2 = (-1)^(p+1)/2 (mod p) are both true? Thanks to all.

- Oct 3rd 2009, 06:18 AMPaulRS
Also, you can take a primitive root module , call it .

Since you have all the quadratic residues (*) there -in both cases-, and they are congruent to: we find that both products are congruent to

But -since and it's primitive- and so we find that the products are congruent to:

(*) is a quadratic residue module p if and only if there exist an integer such that

**EDIT:**What you have there is congruent to now note that ... but then we have: (Happy) -just by applying Wilson's Theorem-