Maths Olympiad Prep

Library / /1 of 4

Number theory Difficulty 5.7 AIME, harder Prove it Romania

Determine all prime numbers p,q<2023p, q < 2023 such that qp2+8q \mid p^2 + 8 and pq2+8p \mid q^2 + 8.

Solution

If one of the numbers is 22, then p=q=2p = q = 2, and we can assume p,q3p, q \ge 3. Since (p,p2+8)=(q,q2+8)=1(p, p^2 + 8) = (q, q^2 + 8) = 1, we have: qp2+8q \mid p^2 + 8 and pq2+8pq(p2+8)(q2+8)pq8(p2+q2+8)pq(p2+q2+8)p \mid q^2 + 8 \Rightarrow pq \mid (p^2 + 8)(q^2 + 8) \Rightarrow pq \mid 8(p^2 + q^2 + 8) \Rightarrow pq \mid (p^2 + q^2 + 8).

For a fixed kNk \in \mathbb{N}^*, we determine the solutions in N×N\mathbb{N}^* \times \mathbb{N}^* of the equation p2+q2+8=kpqp^2 + q^2 + 8 = kpq with p,q<2023p, q < 2023.

Let's assume that (p0,q0)(p_0, q_0) is a solution for which the sum p+qp+q is minimal and p0q0p_0 \ge q_0. If p0=q0p_0 = q_0, since p028p_0^2 \mid 8, we have p0=q0=1p_0 = q_0 = 1 or p0=q0=2p_0 = q_0 = 2 (cases we will analyze later). Now, let's assume that for p03p_0 \ge 3, we have p0>q0p_0 > q_0.

If p05p_0 \ge 5 and pp' is the second solution of the equation x2(q0k)x+q02+8=0x^2 - (q_0k)x + q_0^2 + 8 = 0, then we have p=q02+8p0p022p0+9p0<p0p' = \frac{q_0^2+8}{p_0} \le \frac{p_0^2-2p_0+9}{p_0} < p_0. Since p+q0<p0+q0p' + q_0 < p_0 + q_0, it follows that p0{3,4}p_0 \in \{3, 4\}.

If p0=3p_0 = 3, then q017q_0 \mid 17, so q0=1q_0 = 1 and k=6k = 6. Using Vieta jumping, we obtain the solutions given by the sequence p0=3,q0=1,qn+1=pn,pn+1=6pnqnp_0 = 3, q_0 = 1, q_{n+1} = p_n, p_{n+1} = 6p_n - q_n. Thus, we obtain the solutions (3,1)(3, 1), (17,3)(17, 3), (99,17)(99, 17), (577,99)(577, 99), while the remaining solutions have p2023p \ge 2023. The only solution remaining is (17,3)(17, 3).

If p0=4p_0 = 4, then q024q_0 \mid 24 and q03q_0 \le 3, so q0q_0 is 22 or 11, but both cases are impossible.

Now, let's consider the cases p0=2p_0 = 2 and p0=1p_0 = 1.

If p0=2p_0 = 2, then q012q_0 \mid 12 and q02q_0 \le 2, so q0=2q_0 = 2 (the case q0=1q_0 = 1 is not possible) and k=4k = 4. Using Vieta jumping, all solutions have both components even. The acceptable solution is (2,2)(2, 2).

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.