Maths Olympiad Prep

Library / HMMT February /744 of 1302

HMMT February, 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 n2−qn^{2} - q.

Solutions — 2

Solution 1

Solution:

Note that the condition p∣n2−qp \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 p≡3(mod4)+1 if p≡1(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 p≡q≡3(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 p−1p-1 and p+1p+1 are not powers of 22.

If p≡1(mod4)p \equiv 1 \pmod{4}, then let qq be an odd prime divisor of p−1p-1, so that p≡1(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 p≡3(mod4)p \equiv 3 \pmod{4}, then let qq be an odd prime divisor of p+1p+1, so that p≡−1(modq)p \equiv -1 \pmod{q}. Either q≡1(mod4)q \equiv 1 \pmod{4} so that (qp)=(pq)=1\left(\frac{q}{p}\right) = \left(\frac{p}{q}\right) = 1 or q≡3(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 p≡1(mod4)p \equiv 1 \pmod{4}, then since p>5p > 5, there exists an odd prime divisor qq of p−4p-4, which gives
(qp)=(pq)=(4q)=1 \left(\frac{q}{p}\right) = \left(\frac{p}{q}\right) = \left(\frac{4}{q}\right) = 1

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

If p≡3(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 b≠cb \neq c. Then p−a2=b2+c2p - a^{2} = b^{2} + c^{2} has a prime divisor q≡1(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,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.