Maths Olympiad Prep

Track / Stage 4 / 226 of 340 #966 of 2444

Problem 966

AMC 12 late, AIME early
Number theory Difficulty 4.8 Prove it Harvard-MIT Math Tournament · United States

pp and qq are primes such that the numbers p+qp+q and p+7qp+7q are both squares. Find the value of pp.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

Solution:

Writing x2=p+qx^2 = p + q, y2=p+7qy^2 = p + 7q, we have 6q=y2x2=(yx)(y+x)6q = y^2 - x^2 = (y - x)(y + x). Since 6q6q is even, one of the factors yxy - x, y+xy + x is even, and then the other is as well; thus 6q6q is divisible by 4q4 \Rightarrow q is even q=2\Rightarrow q = 2 and 6q=126q = 12. We may assume x,yx, y are both taken to be positive; then we must have yx=2y - x = 2, y+x=6x=2y + x = 6 \Rightarrow x = 2, so p+2=22=4p=2p + 2 = 2^2 = 4 \Rightarrow p = 2 also.

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