MathDB
x^2+y^2=n mod p, find n,p if x,y exist

Source: IMOC 2017 N8

August 15, 2021
number theory

Problem Statement

Find all pairs (p,n)(p,n) of integers so that pp is a prime and there exists x,y≢0(modp)x,y\not\equiv0\pmod p with x2+y2n(modp).x^2+y^2\equiv n\pmod p.