Hello everyone!

I'm working on this problem:

Q:Find all such that .

Here's my work:

Consider the following cases:

Case 1: is prime.

In is prime, then . However, if this is supposed to satisfy the above requirement, then we must have which is not possible for any .

Case 2: , with p and q prime.

We have . To satisfy the above equality, we must have which is not possible since 1 is not a prime.

Case 3: , with p prime.

We have . To satisfy the above equality, we must have . Therefore is a solution.

Now, I tried other cases that failed (like , , ). I believe that is the only solution, but my main question is when do I know where to stop with all these different cases?

Any help is appreciated!