On uniqueness of sums of prime powers

An exercise in number theory led to me to the following problem:

Find all solutions $(p,n,q,m)$ of the following equation: $$\sum_{k=0}^n p^k = \sum_{h=0}^m q^h,$$ where $p<q$ are distinct primes, and $1 \le m < n$ are indeterminates.

Numerical evidence gives me the only solution $$(p,n,q,m)=(2,4,5,2).$$

There might be no other solution: I have no idea on how to show it. For those interested of the source of this equation, here it comes the interesting exercise in number theory.

Find all numbers $A$ such that the sum of divisors of $A$ divisible by $5$ equals the sum of divisors of $A$ divisible by $2$: $$\sum_{2|d|A} > d = \sum_{5|e|A} e. $$

Clearly this is equivalent to the condition that the sum of divisors of $A$ NOT divisible by $5$ equals the sum of divisors of $A$ NOT divisible by $2$. Let's factorize $A= 2^n \cdot 5^m \cdot w$, with $n,m \ge 0$ and $\gcd(w,10)=1$. Without loss fo generality we can consider $n,m\neq 0$. Then we get $$\sum_{d|2^nw} d = \sum_{e|5^mw} e$$ which is equivalent (using multiplicativity of the sum-of-divisors-function) to $$\sum_{k=0}^n 2^k = \sum_{h=0}^m 5^h$$ Giving us $A=2^4 \cdot 5^2 \cdot w=400w$ (with $\gcd(w,10)=1$). Thus, I am looking for simple generalizations with arbirary primes $p \neq q$.


Solution 1:

Promoting my comment to an answer: the question here is almost exactly the Goormaghtigh Conjecture — the only difference is that the Goormaghtigh Conjecture is just slightly more general and drops the primality condition on the two bases. Unfortunately, none of the references I'm able to find for it suggests that the special case is any simpler than the general conjecture (it's not at all clear how to make use of the primality of the bases to simplify the problem), and given the sparsity of the results, it seems as though the conjecture isn't attracting too much active research.