TITLE: I need help with this divisibility problem.
QUESTION [1 upvotes]: I need help with the following divisibility problem. 
Find all prime numbers m and n such that $mn |12^{n+m}-1$ and $m= n+2$.

REPLY [2 votes]: You want to solve $p(p+2)|(12^{p+1}-1)(12^{p+1}+1)$. 
Hint: First exclude $p=2,3$, so we have
$$\eqalign{
12^{p+1}-1 \equiv 143 &= 11 \cdot 13 &\pmod p,\\
12^{p+1}+1 \equiv 145 &=  5 \cdot 29 &\pmod p,
}$$
and deduce that $p$ must be one of $5,11,29$.
Edit: I'll just add more details: We want that $p$ divides $(12^{p+1}-1)(12^{p+1}+1)$, so $p$ must divide one of the factors of this product. Suppose $p|12^{p+1}-1=k\cdot p+143$ (the congruence follows from Fermat's little theorem). This means $p|143$ and hence $p=11$ or $p=13$. If $p+2$ is prime then we automatically have $p+2|12^{p+1}-1$ again by Fermat's theorem, so $p=11$ is a solution. $p=13$ isn't, as $p+2$ is not prime.
In the other case, $p|12^{p+1}+1$ we get 2 solutions, $p=5$ and $p=29$.
{"set_name": "stack_exchange", "score": 1, "question_id": 129582}