Square Roots and Su mof Two Squares (involves modulos)
I have a few questions about how squares affect mods. Here they are:
1. Assume p to be an odd prime and a is any integer not congruent to 0 modulo p. It can be proven that the congruence (x^2) = ((-a)^2)(mod p) has solutions IFF p = 1 (mod 4).
How is that proven?
2. Assume there are two numbers c and d where GCD[c,d]=1. If p is any prime number and p|((c^2)+(d^2)), then p = 1 (mod 4),
How is this also proven ?
Any help is greatly appreciated!