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

## Homework Statement

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##.

## 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.

## Answers and Replies

I like Serena
Homework Helper
Welcome to PF, TDA120!

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

Happy biking!