I have a question about finding all positive integers n such that

where m is given.

For example

===========================================

For this problem or any problem, how do you know that the possible number of solutions are finite and you are not missing any.

Regarding, to , here is how I approached it.

If p | n, then (p-1) | 12. So, the possible p - 1 =1, 2, 3, 4, 6, 12 since they are factors of 12.

As a result, the possible values of p = 2, 3, 4, 5, 7, 13 but since p is a prime that leaves only p = 2, 3, 5, 7, 13.

From here, how would I continue?

I know that , then

, so would I have to check every 1,2,...,k for each single p's?

Thank you for reading. Any help is greatly appreciated.