I asked this question a couple days ago: Show that for any prime $ p $, there are integers $ x $ and $ y $ such that $ p|(x^{2} + y^{2} + 1) $. But I asked it as a guest, and I could not comment on the answers I got as I did not have enough reputation.
I have found a proof from Warwick University that will help me answer this question, but there is one sentence I am unsure of. If anybody could help me out on it, that would be amazing!
Here it is:
There are $\frac{p+1}{2}$ numbers of the form $x^2 \pmod{\!p}$. There are $\frac{p+1}{2}$ numbers of the form $-1-y^2 \pmod{\!p}$ (because to get the numbers of the form $-1-y^2$, multiply the squares by $-1$ and subtract $1$… this will not change how many there are). There are exactly $p$ numbers mod $p$. Note that $\frac{p+1}{2}$ is more than half of $p$. So the set of numbers of the form $x^2$ and those of the form $\frac{p+1}{2}$ must have at least one common element (if not, we will have too many distinct numbers mod $p$). So there are some $x$ and $y$ such that $x^2\equiv -1-y^2 \pmod{\!p}$. Thus $x^2 + y^2 +1\equiv 0 \pmod{\!p}$.
I understand it up until the bolded sentence. Did they mean to write numbers of the form $\frac{p+1}{2}$? Or did they instead mean numbers of the form $-1-y^2$?
No matter what they meant, would anybody be able to explain more how having at least one overlapping element in both sets tells you that solutions to that congruence exists? How did they come to that conclusion that there is a common element? What would happen if there wasn't a common element? Thank you!