The Student Room Group

Prime numbers problem

I couldn't find any solutions to this problem online (It's an Irish maths olympiad Q1) so just wanted to verify if my solution was correct.

'Find all prime numbers p and q such that p divides q + 6 and q divides p + 7'

np=q+6np=q+6 and mq=p+7mq=p+7 for m,nNm,n \in \mathbb{N}.

From this we get that q=(mn1)1(7n+6)q=(mn-1)^{-1}(7n+6), and as q is prime its only divisors are ±1,±q\pm 1, \pm q. Noting that 7n+6>07n+6>0, the only possibility is that (mn1)1=1(mn-1)^{-1}=1 and 7n+6=q7n+6=q. mn=2mn=2, so either m=2,n=1m=2,n=1 or m=1,n=2m=1,n=2. Checking the two cases gives q=13q=13 or 2020, and so q must equal 13 (this is when n=1). So p=19p=19.

Only valid pairing is (p,q)=(19,13)(p,q)=(19,13)

Does this seem okay?
(edited 2 years ago)
Original post by username53983805
I couldn't find any solutions to this problem online (It's an Irish maths olympiad Q1) so just wanted to verify if my solution was correct.

'Find all prime numbers p and q such that p divides q + 6 and q divides p + 7'

np=q+6np=q+6 and mq=p+7mq=p+7 for m,nNm,n \in \mathbb{N}.

From this we get that q=(mn1)1(7n+6)q=(mn-1)^{-1}(7n+6), and as q is prime its only divisors are ±1,±q\pm 1, \pm q. Noting that 7n+6>07n+6>0, the only possibility is that (mn1)1=1(mn-1)^{-1}=1 and 7n+6=q7n+6=q. mn=2mn=2, so either m=2,n=1m=2,n=1 or m=1,n=2m=1,n=2. Checking the two cases gives q=13q=13 or 2020, and so q must equal 13 (this is when n=1). So p=19p=19.

Only valid pairing is (p,q)=(19,13)(p,q)=(19,13)

Does this seem okay?

Seems correct to me
Reply 2
Agree with the answer. A few things in the proof.

You divide by (mn-1). You might want to comment on why mn>1 (easy, but worth stating).
You dont need to mention -1,-q.
You seem to divide through by (mn-1) but treat its inverse as a factor/multiplier which must be 1? Why couldn't (mn-1)=k and 7n+6=kq? Am I missing something here?
Original post by username53983805
From this we get that q=(mn1)1(7n+6)q=(mn-1)^{-1}(7n+6), and as q is prime its only divisors are ±1,±q\pm 1, \pm q. Noting that 7n+6>07n+6>0, the only possibility is that (mn1)1=1(mn-1)^{-1}=1 and 7n+6=q7n+6=q.

It seems you are assuming (mn1)1(mn-1)^{-1} is an integer - I think this needs some justification...
(edited 2 years ago)

Quick Reply

Latest