Find all prime numbers $ p,q,r$, such that $ \frac{p}{q}-\frac{4}{r+1}=1$
Problem
Source: JBMO 2008 Problem 3
Tags: algorithm, modular arithmetic, number theory proposed, number theory
25.06.2008 15:16
It is easy to see that (r+1)/(r+5)=q/p. So r+1=q and r+5 = p. So r=2 , q=3 and p=7.
25.06.2008 15:27
Actually $ r + 1 = q$ and $ r + 5 = p$ isn't necessary. Also, $ p = 3,q = 2,r = 7$ is another solution which doesn't satisfy your condition.
25.06.2008 17:36
Solution below
Not enough with this hint? Then keep on reading...
If this is still not enough...
25.06.2008 17:39
As suggested by Taidoda-X, note that $ \dfrac{p}{q}=\dfrac{r+5}{r+1}$. Euclid's algorithm immediately yields that $ \lambda(r)=(r+5,r+1)=(4,r+1)$. Hence, $ \lambda(r)\in\{1;2;4\}$. Note also that $ p>q$. The rest is little more than casework: $ \lambda(r)=1$: This readily implies $ r+1=q$, whence the solution $ (p,q,r)=(7,3,2)$ $ \lambda(r)=2$: We get $ 2p=r+5$ and $ 2q=r+1$. Thus, additionning and subtracting the two equalities, $ p+q=r+3$ and $ p-q=2$. Suppose $ p,q,r\geq5$. Hence, $ p+q\equiv 0,2\mbox{ mod }6$ and $ r+3\equiv 2,4\mbox{ mod }6$, implying that $ p\equiv q\equiv 1\mbox{ mod }6$, contradicting the fact that $ p$ and $ q$ are twin primes. Checking the remaining cases, we find the solution $ (p,q,r)=(5,3,5)$. $ \lambda(r)=4$: Subtracting the equalities $ 4p=r+5$ and $ 4q=r+1$, we find that $ p-q=1$, which readility implies the solution $ (p,q,r)=(3,2,7)$.
26.06.2008 16:52
p(r+1)=q(r+5) Now, take cases for r=2,3,6k-1,6k+1 Case(1): r=2 p=7,q=3 (7,3,2) Case(2): r=3 p/q=9/4. So, no solution Case(3): r=6k-1 p*3k = q*(3k+2) 3k+2 is not divisible by 3 => 3 is a divisor of q => q=3 => kp=3k+2 => k(p-3)=2 (i) k=2 => p=4 contradiction (ii)k=1 => p=5 => r=5 (5,3,5) Case(4): r=6k+1 p*(3k+1)=3q*(k+1) 3k+1 is not divisible by 3 => 3 is a divisor of p => p=3 => 3k+1=kq+q => k(3-q)=(q-1). k>0 => q = 2 => k=1 => r =7 (3,2,7) Solutions: (7,3,2),(5,3,5) and (3,2,7)
26.06.2008 21:16
I'am not sure is this correct.... We easily see that r=(5q-p)/(p-q)=-5+(4p)/(p-q) As r is integer, we see that 4p=k(p-q), k is positive integer. 4p=2*2*p p-q<p We see that p-q=1 or p-q=2 or p-q=4 If p-q=1, then p=3, q=2, r=7 If p-q=2, then p=5,q=3, r=5 or p=6k+1, q=6k-1. It follows that r=12k-3. Then r is not prime, contradiction. If p-q=4, then p=7,q=3,r=2 or p=6k+5, q=6k+1. Then r=6k, r is not prime, again contradiction. Solutions: (3,2,7), (5,3,5), (7,3,2).
09.01.2011 18:58
My solution..... p/q-4/(r+1)=1 [p(r+1) - 4q] / q(r+1) = 1 p(r+1) - 4q = q(r+1) pr+p-4q = qr+q pr - qr = 4q + q - p r(p-q) = 4q + q - p r = [4q + (q - p)] / [p-q] r = [4q - (p - q)] / p - q r = 4q / (p-q) - 1 p-q|4q p-q = 1 ; p-q = 2 ; p-q = 4 For the first and third case the solution [7,3,2] ; but for second case p,q,r isn't simple number.....
10.01.2011 15:18
naye,will you post your full solution?I am curious.
23.01.2011 21:30
An easier solution: $r+1=\frac {4q} {p-q},gcd(q,p-q)=1\implies p-q=1,2,4$ #$1.p-q=1,p=3,q=2,r=7$ #$2.p-q=2,q=6n-1,$if $p>3,$ and then $r=3(4n-1),$so $p=5,q=3,r=5$ #$p-q=4,r+1=q\implies q=3,r=2,p=7$ That's all we need.
05.04.2011 20:59
Can you explain your solution more clearly?
06.04.2011 08:14
$\# .$If $p-q=,$it has the only solution $p=3,q=2$ because then they are of different pairity,so the smaller one is even i.e. $q=2$.Then $r=7$ $\#2.$If $p-q=2$ then it is well known that every prime greater than $3$ is of the form $6n\pm 1$ Using this,$p\equiv 1\mod 6,q\equiv -1\mod 6$ but then $r+1=2q\implies r=2(6q-1)-1=3(2q-1)$ which is not a prime.So then the only possible value is $p=5,q=3$ $\#3.p-q=4,r+1=q$ so then $r=2,q=3$ is the only solution
04.07.2014 14:02
p,q,r-prime pr+p-4=qr+q =>pr+p-qr-q=4 =>p(r+1)-q(r+1)=4; (r+1)(p-q)=4 System 1)r+1=1 p-q=4 =>r=0 it’s not true 2)r+1=4 p-q=1 => p-q=1 it’s not true 3)r+1=2 p-q=2=>r=1;p=2+q
16.07.2014 01:57
Above is not true because $(r+1)(p-q)=4q$ Solution:Let $r\equiv{1}(mod3)$ $\implies$ $q=3$$\implies$ $12=(p-q)(r+1)$ , done ! Let $r\equiv{2}(mod3)$ $\implies$ $p=3$ $\implies$ $3(r+1)=q(r+5)$ $\implies$ $q<3$ , done! Let $r=3$ $\implies$ $p=2q$ , absurd.
16.07.2014 08:18
Offer to find all the solutions of this equation, and not just simple numbers. Need to write a formula describing the solutions of this equation.
16.07.2014 13:09
individ wrote: Offer to find all the solutions of this equation, and not just simple numbers. Need to write a formula describing the solutions of this equation. In each case, 7 years old child can find solutions.
31.10.2014 02:34
Ahiles wrote: Find all prime numbers $ p,q,r$, such that $ \frac{p}{q}-\frac{4}{r+1}=1$
12.11.2014 21:36
Ahiles wrote: Find all prime numbers $ p,q,r$, such that $ \frac{p}{q}-\frac{4}{r+1}=1$ Another way... Obvious $p=q$ no solutions so...$(p-q,q)=1$ $\dfrac{p-q}{q}=\dfrac{4}{r+1}$ (1) So $p-q=1$ or $p-q=2$ or $p-q=4$ If $p-q=1$ then obvious $(p,q,r)=(3,2,7)$ If $p-q=4$ from (1) $q=r+1$ so obvious $(p,q,r)=(7,3,2)$ If $p-q=2$ from $(1)$ $r+1=2q$ Because $p-q=2$ if $q=3$ we have the solution $(p,q,r)=(5,3,5)$ but if $q>3$ then p>3$ and because $p-q=2$ must $p=1mod6$ , q=5mod6$ so from $r+1=2q$ we have $r=9mod6$ so only if $r=3$ then $q=2$ and $p=4$ no solution... $(p,q,r)=(3,2,7),(7,3,2),(5,3,5)$
18.12.2015 20:32
My solution: Rearrange the condition as $\frac{p}{q}=\frac{r+5}{r+1}$. Observe that $\gcd{(r+5, r+1)}=\gcd{(4, r+1)}=x$. Case 1: $x=1$. Then we must have $r$ even, so $r=2$. Then $p=7, q=3$ yielding the solution $(7, 3, 2)$. Case 2: $x=2$. This is only true if $r=4a+1$ for some integer $a \ge 0$. Then we have $p=2a+3, q=2a+1$ because $\gcd{(2a+3, 2a+1)}=1$. Suppose we have a solution in the form $(2a+3, 2a+1, 4a+1)$. Then either $a \equiv 2 \pmod{3}$ or $a=1$. If $a \equiv 2 \pmod{3}$ then $4a+1$ is not prime, so $a=1$. This gives us the solution $(5, 3, 5)$. Case 3: $x=4$. This is only true if $r=4a+3$ for some integer $a \ge 0$. Hence, $p=2a+2, q=2a+1$. The only primes that differ by $1$ are $2$ and $3$, so $a=1$ and we have the solution $(3, 2, 7)$. So the solutions are $(p, q, r)=(3, 2, 7), (5, 3, 5), (7, 3, 2)$. We are done.
03.01.2019 07:12
The given equation can be rearranged into the below form: $4q = (p-q)(r+1)$ $Case 1: 4|(p-q)$ then we have $q = ((p-q)/4)(r+1)$ $=> (p-q)/4 = 1$ and $q = r + 1$ $=> r = 2, q = 3$ and $p = 7$ $Case 2: 4|(r+1)$ then we have $q = (p-q)((r+1)/4)$ $=> (p-q) = 1$ and $q = (r + 1)/4$ $=> p = q + 1 => q = 2, p = 3$ and $r = 7$ note that if $(r+1)/4 = 1$, then $q = (p-q) => p = 2q$ which is a contradiction. $Case 3: 2|(p-q)$ and $2|(r+1)$ then we have $q = ((p-q)/2)((r+1)/2)$ $=> (p-q)/2 = 1$ and $q = (r+1)/2$ $=> p = q + 2$ and $r = 2q - 1$ We have that exactly one of $q, q + 1, q + 2$ is a multiple of $3$. $q + 1$ cannot be a multiple of $3$ since $q + 1 = 3k => q = 3k - 1$. Since $r = 2q - 1$ is prime, then we have $2(3k - 1) - 1 = 3(2k-1)$ is a prime. $=> k = 1 => q = 2 => p = 4$ contradiction. Also, $q + 2$ cannot be a multiple of $3$ since, $q + 2 = 3k => p = 3k => k = 1 => q = 1$ contradiction. So, $q = 3k$ $=> k = 1 => q = 3, p = 5$ and $r = 5$ Thus we have the following solutions: $(7, 3, 2), (3, 2, 7), (5, 3, 5)$
25.08.2021 09:09
Note that \[\frac{p}{q} - \frac{4}{r+1} = 1 \iff (p-q)(r+1) =4q.\]We must have $p>q$ and $p-q\mid 4q$. Because $\gcd (p-q,q)=1$, so we have $p-q\mid 4$. If $p-q=1$, we have $(p,q,r) = (3,2,7)$. If $p-q=2\iff p=q+2$, we also have $r=2q-1$. Note that $(p,q,r) = (5,3,5)$ is solution. Consider when $q>3$. Let $q= 6k+1\implies p= 6k+3$ or $q=6k+3\implies r=12k + 9$ for some positive integer $k$, but this contradiction $p,r$ is prime numbers. If $p-q=4\iff p =q+4$, we alsp have $r = q-1$. Then, $(p,q,r) = (7,3,2)$. Therefore, the solution : $(p,q,r) = (3,2,7),(5,3,5),(7,3,2)$.
21.10.2021 22:15
Multiplying by $q(r+1)$ gives $p(r+1)-4q=q(r+1)$, or $pr-4q+p=qr+q$, equivalent to $pr+p=qr+5q$ after simplification. This means $p(r+1)=q(r+5)$, or $\frac{p}{q}=\frac{r+5}{r+1}$. Now we take cases. From Euclidean Algorithm, the maximum value of $\gcd(r+5,r+1)$ is $4$, attained with $r=4k+3$, giving $\frac{p}{q}=\frac{4k+8}{4k+4}=\frac{k+2}{k+1}$. This would mean $p=k+2, q=k+1$, only possible with $k=1 \implies (3,2,7)$. We cannot have $\gcd(r+5, r+1) = 3$, as $r+5 \equiv 0 \pmod 3$ means $r \equiv 1 \pmod 3$ and $r+1 \equiv 2 \pmod 3$. If $\gcd(r+5,r+1)=2$, then $r=4k+1$, so $\frac{p}{q}=\frac{2k+3}{2k+1}$. These two have GCD $1$, so $p=2k+3, q=2k+1, r=4k+1$. Assume $p, q, r \neq 3$. Then the second equation gives $k \equiv 2 \pmod 3$, but this is not possible due to the third equation. If $p=3$, then $k=0$, which does not work. If $q=3$, then $k=1$, which gives $(5,3,5)$. If $r=3$, then $k=\frac{1}{2}$, which does not work. Lastly, we could have $\gcd(r+5, r+1)=1$, which means $p=r+5, q=r+1$. Clearly $r$ then must be even, so $r=2$, which gives $(7,3,2)$. Our solutions are $\boxed{(3,2,7),(5,3,5),(7,3,2)}$.
13.04.2023 03:46
daniel73 wrote: Solution below
Not enough with this hint? Then keep on reading...
If this is still not enough...
Thanks! That second hint really helped me, then it was just casework. My sols were $(p, q, r) = (3, 5, 5), (3, 2, 7), and (2, 3, 7).$