Task 1. Find all pairs of prime numbers $(p, q)$ for which there exist positive integers $(m, n)$ such that

$$
(p+q)^{m}=(p-q)^{n}
$$
Solution. The only divisor that $p-q$ and $p+q$ can have in common is 2, because $p$ and $q$ are different prime numbers. Indeed, a divisor $d$ of $p+q$ and $p-q$ is also a divisor of $(p+q)+(p-q)=2p$ and of $(p+q)-(p-q)=2q$. And we know that $\operatorname{gcd}(2p, 2q)=2$, so $d$ must be a divisor of 2.

Since every prime factor of $|p-q|$ or $p+q$ must, due to the given equation, also be a prime factor of the other, we now know that $|p-q|$ and $p+q$ are both powers of 2 (not equal to 1). But the greatest common divisor is 2, so the smaller of the two powers of two (and that must be $|p-q|$) is equal to 2. Thus, $|p-q|=2$ and $p+q$ is a power of 2. Therefore, there is exactly one number between $p$ and $q$, namely $\frac{p+q}{2}$. Since $p+q$ is a power of 2, $p+q$ is not divisible by 3. So $\frac{p+q}{2}$ is also not divisible by 3. Since one of three consecutive numbers must be divisible by 3, it follows that $p$ or $q$ is divisible by 3. Since 1 is not a prime number, the smaller of $p$ and $q$ must be 3 and the other 5. We find two solutions, $(p, q)=(3,5)$ and $(p, q)=(5,3)$, both of which satisfy the condition.