Maths Olympiad Prep

Library / /451 of 520

Number theory Difficulty 6.9 National olympiad Prove it

Theorem 1 Let pp be a prime, then the indeterminate equation
x2+y2=px^{2}+y^{2}=p

has a solution if and only if p=2p=2 or (1p)=1\left(\frac{-1}{p}\right)=1, i.e., p=2p=2 or p=4k+1p=4k+1.

Solution

To prove the necessity: Since pp is a prime, if the indeterminate equation (1) has a solution x0,y0x_{0}, y_{0}, it must satisfy
(x0,y0)=(x0y0,p)=1,\left(x_{0}, y_{0}\right)=\left(x_{0} y_{0}, p\right)=1,

Thus, there must be a y01y_{0}^{-1} such that y01y01(modp)y_{0}^{-1} y_{0} \equiv 1(\bmod p). This leads to
(x0y01)2+1+kp=(y01)2p\left(x_{0} y_{0}^{-1}\right)^{2}+1+k p=\left(y_{0}^{-1}\right)^{2} p

If p>2p>2, from the above equation we get
(x0y01)21(modp)\left(x_{0} y_{0}^{-1}\right)^{2} \equiv-1(\bmod p)

That is, (1p)=1\left(\frac{-1}{p}\right)=1, which implies p=4k+1p=4 k+1 (see Chapter 4, §5, Corollary 3). This proves the necessity.

To prove the sufficiency: When p=2p=2, we have 2=12+122=1^{2}+1^{2}, so (1) has a solution. When p>2p>2, from (1p)=1\left(\frac{-1}{p}\right)=1 (i.e., p=4k+1p=4 k+1), there must be an xx such that
x2+10(modp),0x<px^{2}+1 \equiv 0(\bmod p), \quad 0 \leqslant x < p

Let m0m_{0} be the smallest mm for which
x2+y2=mpx^{2}+y^{2}=m p

holds. If we can prove m0=1m_{0}=1, then we have proven the sufficiency. At this point, similar to the proof of Theorem 2 in §1, we can show that (x,y)=1(x, y)=1 (left to the reader). We will use proof by contradiction to show that m0=1m_{0}=1. If m0>1m_{0}>1, take
{ux(modm0),um0/2,vy(modm0),vm0/2\left\{\begin{array}{ll} u \equiv x\left(\bmod m_{0}\right), & |u| \leqslant m_{0} / 2, \\ v \equiv y\left(\bmod m_{0}\right), & |v| \leqslant m_{0} / 2 \end{array}\right.

From this and (x,y)=1(x, y)=1, we immediately get
0<u2+v2m02/2,u2+v2x2+y2(modm0)0<u^{2}+v^{2} \leqslant m_{0}^{2} / 2, \quad u^{2}+v^{2} \equiv x^{2}+y^{2}\left(\bmod m_{0}\right)

Using equation (3) with m=m0m=m_{0}, we get
(u2+v2)(x2+y2)=m1m02p,1m1<m0.\left(u^{2}+v^{2}\right)\left(x^{2}+y^{2}\right)=m_{1} m_{0}^{2} p, \quad 1 \leqslant m_{1}<m_{0} .

Using the well-known identity
(a12+a22)(b12+b22)=(a1b1+a2b2)2+(a1b2a2b1)2,\left(a_{1}^{2}+a_{2}^{2}\right)\left(b_{1}^{2}+b_{2}^{2}\right)=\left(a_{1} b_{1}+a_{2} b_{2}\right)^{2}+\left(a_{1} b_{2}-a_{2} b_{1}\right)^{2},

the above equation becomes
(ux+vy)2+(uywx)2=m1m02p.(u x+v y)^{2}+(u y-w x)^{2}=m_{1} m_{0}^{2} p .

From equation (4) and equation (3) with m=m0m=m_{0}, we have
ux+vyx2+y20(modm0)uyvx0(modm0)\begin{array}{c} u x+v y \equiv x^{2}+y^{2} \equiv 0\left(\bmod m_{0}\right) \\ u y-v x \equiv 0\left(\bmod m_{0}\right) \end{array}

Thus, we have
(ux+vym0)2+(uyvxm0)2=m1p,1m1<m0\left(\frac{u x+v y}{m_{0}}\right)^{2}+\left(\frac{u y-v x}{m_{0}}\right)^{2}=m_{1} p, \quad 1 \leqslant m_{1}<m_{0}

This contradicts the minimality of m0m_{0}. Therefore, m0=1m_{0}=1. Proof complete.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.