题目短小精悍,耗了我 2−12^{-1}2−1 个小时:
对于一个素数 ppp,x2+y2=px^2+y^2=px2+y2=p 有整数解当且仅当 p=2p=2p=2 或 p≡1( mod 4)p\equiv 1(\!\!\!\!\mod 4)p≡1(mod4)。