Maths Olympiad Prep

Library / /799 of 1394

, 2020

Number theory Difficulty 5.3 AIME, harder Prove it United States

Problem:

Let p>5p > 5 be a prime number. Show that there exists a prime number q<pq < p and a positive integer nn such that pp divides n2qn^{2} - q.

Solutions — 2

Solution 1

Solution:

Note that the condition pn2qp \mid n^{2} - q just means that qq is a quadratic residue modulo pp, or that the Legendre symbol (qp)\left(\frac{q}{p}\right) is 11. We use these standard facts about the Legendre symbol:
- If p±1(mod8)p \equiv \pm 1 \pmod{8}, then (2p)=1\left(\frac{2}{p}\right) = 1.
- For an odd prime pp,
(1p)={1 if p3(mod4)+1 if p1(mod4) \left(\frac{-1}{p}\right) = \begin{cases} -1 & \text{ if } p \equiv 3 \pmod{4} \\ +1 & \text{ if } p \equiv 1 \pmod{4} \end{cases}
- Quadratic reciprocity: for distinct odd primes pp and qq,
(pq)(qp)={1 if pq3(mod4)+1 otherwise  \left(\frac{p}{q}\right)\left(\frac{q}{p}\right) = \begin{cases} -1 & \text{ if } p \equiv q \equiv 3 \pmod{4} \\ +1 & \text{ otherwise } \end{cases}

If pp is a Fermat prime or Mersenne prime, then pp is congruent to 11 or 77 modulo 88 respectively, since p>5p > 5. In that case q=2q = 2 works. Otherwise assume pp is not a Fermat prime or Mersenne prime, so that p1p-1 and p+1p+1 are not powers of 22.

If p1(mod4)p \equiv 1 \pmod{4}, then let qq be an odd prime divisor of p1p-1, so that p1(modq)p \equiv 1 \pmod{q}. Then by quadratic reciprocity (qp)=(pq)=1\left(\frac{q}{p}\right) = \left(\frac{p}{q}\right) = 1.

If p3(mod4)p \equiv 3 \pmod{4}, then let qq be an odd prime divisor of p+1p+1, so that p1(modq)p \equiv -1 \pmod{q}. Either q1(mod4)q \equiv 1 \pmod{4} so that (qp)=(pq)=1\left(\frac{q}{p}\right) = \left(\frac{p}{q}\right) = 1 or q3(mod4)q \equiv 3 \pmod{4} so that (qp)=(pq)=(1q)=1\left(\frac{q}{p}\right) = -\left(\frac{p}{q}\right) = -\left(\frac{-1}{q}\right) = 1.

Solution 2

Solution:

(Ankan Bhattacharya) We assume the same standard facts about quadratic residues as the previous solution.

If p1(mod4)p \equiv 1 \pmod{4}, then since p>5p > 5, there exists an odd prime divisor qq of p4p-4, which gives
(qp)=(pq)=(4q)=1 \left(\frac{q}{p}\right) = \left(\frac{p}{q}\right) = \left(\frac{4}{q}\right) = 1

If p7(mod8)p \equiv 7 \pmod{8}, then we can take q=2q = 2.

If p3(mod8)p \equiv 3 \pmod{8}, then by Legendre's three square theorem there exist odd a,b,ca, b, c satisfying p=a2+b2+c2p = a^{2} + b^{2} + c^{2}. Since p>3p > 3, these are not all equal and we may assume without loss of generality that bcb \neq c. Then pa2=b2+c2p - a^{2} = b^{2} + c^{2} has a prime divisor q1(mod4)q \equiv 1 \pmod{4}, which gives
(qp)=(pq)=(a2q)=1 \left(\frac{q}{p}\right) = \left(\frac{p}{q}\right) = \left(\frac{a^{2}}{q}\right) = 1

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: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.