Does $p_{1}^x + p_{2}^y = n$ have uniqe solution for $x$ and $y$ ($p_{1}, p_{2}$ are primes).

82 Views Asked by At

If I'm given a value $n$. And I know its of the form $p_{1}^x + p_{2}^y$, can I be sure that there is a unique solution for $x$ and $y$ and Can I determine values of $x$ and $y$, If I know the primes $p_{1}$ and $p_{2}$ (and $p_{1} \ne p_{2}$)

If yes, how to prove it?

2

There are 2 best solutions below

5
On BEST ANSWER

From $$p^x+q^y=p^s+q^t$$ if $(x,y)\neq(s,t)$, we have $$p^s(p^{x-s}-1)=q^y(q^{t-y}-1)$$

so $p\equiv 1\pmod q$ and $q\equiv 1\pmod p$. This is not possible.

THIS IS WRONG: PLEASE UNACCEPT (sorry for caps, only for visibility)

To find the exponents, if $n$ is not very big, the fastest and easiest way is perhaps bruteforcing.

Remark: I have assumed that the exponents are positive. If they may be $0$ we have for example $$2^3+3^2=2^4+3^0$$

0
On

The short answer to the question is "no". For each of $$ n \in \{ 11, 35, 133, 259, 2200 \}, $$ we can find distinct primes $p$ and $q$ for which we have $$ p^a+q^b=p^c+q^d = n $$ with $(a,b) \neq (c,d)$ and all of $a, b, c$ and $d$ positive integers. Probably this property is not true for other values of $n$, but that does not appear at all easy to prove.

Given $p$ and $q$ and the knowledge that $p^a+q^b=n$ for some integers $a$ and $b$, finding these exponents is certainly polynomial time in $n$.