# Proof p=1 mod 4 if p|x^2+1

1. Apr 19, 2012

### TDA120

1. The problem statement, all variables and given/known data

Let n be a whole number of the form $n=x^2+1$ with $x \in Z$, and p an odd prime that divides n.
Proof: $p \equiv 1 \mod 4$.

2. Relevant equations

3. The attempt at a solution

The only relevant case is if p=3 mod 4.

If I try to calculate mod 3, or mod 4, or mod p, I'm not getting anywhere.

2. Apr 20, 2012

### I like Serena

Welcome to PF, TDA120!

Someone gave me a hint: what is the order of x in $\mathbb{Z}/p\mathbb{Z}^\times$?

Happy biking!