Find all pairs $(p,n)$ of integers so that $p$ is a prime and there exists $x,y\not\equiv0\pmod p$ with $$x^2+y^2\equiv n\pmod p.$$
Problem
Source: IMOC 2017 N8
Tags: number theory
jasperE3
15.08.2021 07:02
https://aops.com/community/p11383321 kaede wrote: Let $a$ be coprime to $p$ and $p>2.$ Since $\sum^{p-1}_{j=1}\left(\frac{a-j^{2}}{p}\right) =-\left(\frac{a}{p}\right) -\left(\frac{-1}{p}\right)$, there exists an integer $y(0<y< p)$ such that $\left(\frac{a-y^{2}}{p}\right) =+1$ when $p>5$. It follows that $x^{2}+y^{2} \equiv a\pmod p$ for $x,y\not\equiv 0\pmod p$ when $p>5$. Note that if $p\equiv 1\pmod 4$, then there exist $x,y\not\equiv 0\pmod p$ satisfying $x^{2}+y^{2} \equiv 0\pmod p$, and that if $p\equiv 3\pmod 4$, then there does not exist $x,y\not\equiv 0\pmod p$ satisfying $x^{2}+y^{2} \equiv 0\pmod p$. The rest is easy.
Scrutiny
15.08.2021 11:58
Given an odd prime $p$ and an integer $a.$ Find the number of solutions to
$$x^2+y^2\equiv a\pmod p$$, where $0\le x,y\le p-1.$
. See here.