Find all prime numbers $p$ and $q$ such that $$1 + \frac{p^q - q^p}{p + q}$$is a prime number. Proposed by Dorlir Ahmeti, Albania
Problem
Source: JBMO 2020
Tags: number theory, prime numbers, Junior Balkan, Junior, jbmo2020, geometry
11.09.2020 20:27
This problem it is proposed by me (Dorlir Ahmeti, Albania).
11.09.2020 23:45
Really nice problem! Although that should be expected given the proposer I claim the only answer is $\boxed{(p,q)=(2,5)}$, which clearly works. Clearly $p\neq q$. We are given that $p^q+p-q^p+q=r(p+q)$ for some prime $r$. However, $$LHS\equiv q-q^p\equiv q-q\equiv 0\pmod{p}$$This implies $p|r(p+q)\implies p|r\implies r=p$. Now, we have $p^q+p-q^p+q=p(p+q)\implies p^q-q^p=(p-1)(p+q)$. Now, the equation modulo $q$ gives $p\equiv p(p-1)\pmod{q}\implies q|p-2$. This means that $p=2$ or $p>q$. If $p>q\geq 2$, then $p^q>q^p$ says that $p,q$ cannot be both greater than $e$. This means that one of the primes must be $2$, so $q=2$, and $p^2>2^p\implies p=3$. This gives $(p,q)=(3,2)$, but this clearly fails. Otherwise, we have $p=2$, so $2^q-q^2=q+2\implies 2^q=q^2+q+2$. If $q>5$, then there are clearly no solutions (calculus works), so testing the rest gives $q=5$. Therefore, our only solution is indeed $(p,q)=(2,5)$.
12.09.2020 01:52
Sorry for the double post, but which pairs of primes $(p,q)$ make $\frac{p^q - q^p}{p + q}$ an integer? I was stuck on this rabbit-hole for a while before I noticed the right solution, but I am curious to see whether this is solvable or not.
28.09.2020 01:44
Lukaluce wrote: Find all prime numbers $p$ and $q$ such that $$1 + \frac{p^q - q^p}{p + q}$$is a prime number. Proposed by Dorlir Ahmeti, Albania Just observe by FLT $p^q\equiv p\mod q, q^p\equiv q \mod p$ so let $p^q=qx+p , q^p=px_1+q$ also let's assume $p, q$ are odd primes then $2|x, 2|x_1$ So $2|\frac{qx - qx_1 +2p}{p+q}$ but it is given that $\frac{qx - qx_1 +2p}{p+q}$ is a prime so we must have $1 + \frac{p^q - q^p}{p + q}= 2$ $\implies \frac{p^q - q^p}{p + q} =1$ So we have $\frac{p^{q-1}-1}{q}=\frac{q^{p-1}+1}{p}$ As $q|p^{q-1}-1$ so $q^{p-1}+1\equiv 0\mod p$ But $q^{p-1}+1\equiv 2\mod p$ so $p=2$ is only valid. Now putting $p=2$ we get $2^{q-1} -1=q(\frac{q+1}{2})$ let $q=2k+1$ Then $2^{2k}-1=(2k+1)(k+1)$ just observe as $2^{2k}-1$ is strictly increasing function So for every $K>2$ we have $2^{2k}-1>(2k+1)(k+1)$ so either $k=1,2$ So at $k=2$ we get $q=5$ . So $(q,p)=(5,2)\blacksquare$
10.10.2020 11:47
Lemma: if $a>b>e$, prove that $ b^a > a^b .$ Proof of lemma: That is, it remains to prove that the function $f(x)=\frac{ln x}{x}$ is decreasing. $f'(x)=\frac{1-ln x}{x^2}$ which is obviously $<0$ when $x>e.$ Simple problem with this lemma. Solution: Obviously $$1+\frac{p^q-q^p}{p+q}=p$$The cases when $p=2$ or $q=2$ are killed by induction. Taking modulo $q$ $\implies$ $q \mid p-2$ which means $p>q>e.$ By lemma $LHS$ is $<1$. We are done.
31.05.2021 18:30
Adilet160205 wrote: Lemma: if $a>b>e$, prove that $ b^a > a^b .$ Proof of lemma: That is, it remains to prove that the function $f(x)=\frac{ln x}{x}$ is decreasing. $f'(x)=\frac{1-ln x}{x^2}$ which is obviously $<0$ when $x>e.$ Simple problem with this lemma. Solution: Obviously $$1+\frac{p^q-q^p}{p+q}=p$$The cases when $p=2$ or $q=2$ are killed by induction. Taking modulo $q$ $\implies$ $q \mid p-2$ which means $p>q>e.$ By lemma $LHS$ is $<1$. We are done. Well, this is kinda weird cause your proof does not spot the solution $(p,q) = (2,5)$.
31.05.2021 19:01
We have the equation $$p^q - q^p + p + q = r(p+q)$$where $r$ is prime. Considering the equation mod $p$ gives $\text{LHS} \equiv 0 \pmod{p}$ whereas $\text{RHS} \equiv rq \pmod{p}$. If $p = q$, then we have $r = 1$, which isn't prime. Therefore $r = p$. So we have $$p^q - q^p + p + q = p^2 + pq \qquad (1)$$Now analyze modulo $q$. $\text{LHS} \equiv 2p \pmod{q}$ and $\text{RHS} \equiv p^2 \pmod{q}$. Since $p \neq q$, $(p, q) = 1$ therefore $p \equiv 2 \pmod{q}$. Now suppose $p > q$. Then from $(1)$ we have the $\text{LHS} < \text{RHS}$ since $p^q - q^p < 0$ for $p>q$ (well known lemma). Additionally, $p+q < p^2 + pq$. Hence $p < q \implies p = 2$. Hence $(1)$ becomes $$2^q - q^2 + q + 2 = 4 + 2q \implies 2^q = q^2 + q + 2$$It is simple to notice, and to prove that the LHS of the above equation is much greater than the RHS when $q > 5$, so the only solution must be when $q \leq 5 \implies q \in \{3, 5 \}$ but $q = 3$ does not work, hence $\boxed{(p, q) = (2, 5)}$ is the only solution.
31.05.2021 19:27
hydo2332 wrote: Adilet160205 wrote: Lemma: if $a>b>e$, prove that $ b^a > a^b .$ Proof of lemma: That is, it remains to prove that the function $f(x)=\frac{ln x}{x}$ is decreasing. $f'(x)=\frac{1-ln x}{x^2}$ which is obviously $<0$ when $x>e.$ Simple problem with this lemma. Solution: Obviously $$1+\frac{p^q-q^p}{p+q}=p$$The cases when $p=2$ or $q=2$ are killed by induction. Taking modulo $q$ $\implies$ $q \mid p-2$ which means $p>q>e.$ By lemma $LHS$ is $<1$. We are done. Well, this is kinda weird cause your proof does not spot the solution $(p,q) = (2,5)$. If you read my solution carefully, you will see that I did not analyze the cases when one of the prime equals 2. The solutions are easily found by induction. (I am too lazy, sorry)
13.02.2022 17:35
Lukaluce wrote: Find all prime numbers $p$ and $q$ such that $$1 + \frac{p^q - q^p}{p + q}$$is a prime number. Proposed by Dorlir Ahmeti, Albania Pretty easy? I claim that the expression that is supposed to be prime is \(p\). Indeed, we want \[\frac{p+q+p^q-q^p}{p+q}\]to be prime. Taking modulo \(p\) tells us that the prime is divisible by \(p\) (trivial FLT), and so is \(p\) as claimed. Now, we want to solve \[p^q-q^p=(p-1)(p+q)\]Taking modulo \(p-1\), we see that \[q^p\equiv1\pmod{p-1}\]and so as \(\phi(p-1)<p\) and \(p\) is prime, we see that \(\phi(p-1)\mid p\) by eulers theorem. Therefore, \(\phi(p-1)=1\) and so \(p=2\). Now, you want to solve \(2^q-q^2=q+2\) or \(2^q=q^2+q+2\). Notice that if \(q>5\), then \(2^q>q^2+q+2\), we could inductively prove this. Therefore \(q<5\), and checking gives \(q=5\) the only solution. Therefore, \((p,q)=(2,5)\).
28.05.2022 16:30
I see that the post lacks a complete solution which does not involve derivatives or order modulo prime (c'mon people, these are just little kids, they are not supposed to be operating well with this kind of craziness), so let's give it here! Suppose the prime in the problem condition is equal to $r$, so that $p^q - q^p = (r-1)(p+q)$. By Fermat we have modulo $p$ that $-q \equiv q(r-1) \pmod p$, i.e. $p$ divides $qr$, hence $p=q$ or $p=r$. If $p=q$, then the left hand side is $0$ but the right hand one is positive, impossible. Hence $p=r$ and $p^q - q^p = (p+q)(p-1)$. Now modulo $q$ gives by Fermat that $q$ divides $p(p-1) - p = p(p-2)$ and since $p=q$ was already thrown out, we get that $q$ divides $p-2$ - so $p=2$ or $p \geq q + 2 > q \geq 3$ (for $q=2$ we again have $p=2$, as $2$ divides $p-2$). For $p=2$ we look at $2^q = q^2 + q + 2$. It is impossible for $q=2$, $q=3$, works for $q=5$, and for $q\geq 7$ we will show that $2^{n-1} > n^2$ for every (not necessarily prime) $n\geq 7$ by induction (and we shall be done, as then $2^n > 2n^2 > n^2 + n + 2$). For $n=7$ this is clear and for the transition it is sufficient to multiply $2^{n-1} > n^2$ with the correct $2 > \frac{(n+1)^2}{n^2}$ (which holds because $\left(1+\frac{1}{n}\right)^2 \leq \left(1+\frac{1}{7}\right)^2 = \frac{64}{49} < 2$). Hence in this case only $p=2$, $q=5$, $r=2$ is a solution. For $p>q\geq 3$ we will reach a contradiction as follows - the right hand side in $p^q - q^p = (p+q)(p-1)$ is positive and if we show that the left hand one is not, we shall be done. In other words, it suffices to show that for every two positive integers $y>x \geq 3$ we have $x^y > y^x$. We shall prove $x^{x+a} > (x+a)^x$ for $x\geq 3$ and $a\geq 1$ by induction on $a$. When $a=1$ we want $x^{x+1} > (x+1)^x$ for $x\geq 3$, i.e. $x > \left(1+\frac{1}{x}\right)^x$. By the formula for an expression of the form $(A+B)^n$ we have \begin{align*} \left(1+\frac{1}{x}\right)^x & = \sum_{i=0}^{x} \binom{x}{i}\frac{1}{x^i} \leq \sum_{i=0}^{x} \frac{x^i}{i!}\frac{1}{x^i} = \sum_{i=0}^{x} \frac{1}{i!} \leq 2 + \sum_{i=2}^{x} \frac{1}{i(i-1)} \\ & = 2 + \sum_{i=2}^x \left(\frac{1}{i-1} - \frac{1}{i}\right) = 3 - \frac{1}{x} < 3 \end{align*}i.e. $\left(1+\frac{1}{x}\right)^x < 3 \leq x$. For moving from $a$ to $a+1$ it suffices to prove $x > \left(\frac{x+a+1}{x+a}\right)^x$ - as then by multiplying it with $x^{x+a} > (x+a)^x$ from the induction hypothesis, we will be done.We proceed as above, namely $\left(1+\frac{1}{x+a}\right)^x < \left(1+\frac{1}{x}\right)^x < x$ (the last one follows exactly as above).