Maths Olympiad Prep

Library / /446 of 520

Number theory Difficulty 6.9 National olympiad Prove it

Lemma 9 Let n>1n>1. If the quadratic congruence
s21(modn)s^{2} \equiv-1(\bmod n)

has a solution s1modns_{1} \bmod n, then, the indefinite equation (20) has a primitive solution, and there must be a non-negative primitive solution x1,y1x_{1}, y_{1}, satisfying
s1y1x1(modn)s_{1} y_{1} \equiv x_{1}(\bmod n)

Solution

Proof: Clearly, we have (s1,n)=1\left(s_{1}, n\right)=1, hence by Lemma 4, there must exist u0,v0u_{0}, v_{0} satisfying
0<u0n,0<v0<n0<\left|u_{0}\right| \leqslant \sqrt{n}, \quad 0<\left|v_{0}\right|<\sqrt{n}

and
s1u0v0(modn)s_{1} u_{0} \equiv v_{0}(\bmod n)

From equation (37), we get
2u02+v02<2n2 \leqslant u_{0}^{2}+v_{0}^{2}<2 n

Since s1s_{1} satisfies the congruence equation (35), from equation (38) we can deduce
u02+v020(modn)u_{0}^{2}+v_{0}^{2} \equiv 0(\bmod n)

From the above two equations, we obtain
u02+v02=nu_{0}^{2}+v_{0}^{2}=n

Thus, u0,v0u_{0}, v_{0} is a solution to (20). Next, we prove that it is primitive, i.e., d=(u0,v0)=1d=\left(u_{0}, v_{0}\right)=1. From equation (39), we have d2nd^{2} \mid n, and from equation (38), we get
s1(u0/d)v0/d(modn/d)s_{1}\left(u_{0} / d\right) \equiv v_{0} / d(\bmod n / d)

Therefore,
nd2=(u0d)2+(v0d)2(u0d)2+s12(u0d)20(modnd)\frac{n}{d^{2}}=\left(\frac{u_{0}}{d}\right)^{2}+\left(\frac{v_{0}}{d}\right)^{2} \equiv\left(\frac{u_{0}}{d}\right)^{2}+s_{1}^{2}\left(\frac{u_{0}}{d}\right)^{2} \equiv 0\left(\bmod \frac{n}{d}\right)

Here, we used s121(modn/d)s_{1}^{2} \equiv-1(\bmod n / d). The above equation holds only when d=1d=1. Therefore, u0,v0u_{0}, v_{0} is a primitive solution to (20).

Finally, when u0,v0u_{0}, v_{0} have the same sign, take y1=u0,x1=v0y_{1}=\left|u_{0}\right|, x_{1}=\left|v_{0}\right|; when u0,v0u_{0}, v_{0} have opposite signs, take x1=u0,y1=v0x_{1}=\left|u_{0}\right|, y_{1}=\left|v_{0}\right|. We can easily verify that x1,y1x_{1}, y_{1} is a non-negative (actually positive) primitive solution to (20) and satisfies equation (36) (left to the reader). The lemma is proved.

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.