# Find m, n and p

Find all positive integers $m, n$, and primes $p ≥ 5$ such that $m(4m^2 + m + 12) = 3(p^n − 1)$

I factorized L.H.S. and then used the fact that L.H.S. must be odd since R.H.S. is odd
Further as the factors are $(m^2+3)(4m+1)$ then $(m^2+3)$ must be odd since $(4m+1)$ is odd. That means $m$ must be even. I then substituted $m=2k$. Equation became $(4k^2+3)(8k+1)=3p^n$. Then I made two cases : Either $3$ divides $(4k^2+3)$ or $3$ divides $(8k+1)$. But then I couldn't go any further.

• RHS is even! Is it a typo? – rewritten Jan 21 '14 at 16:29
• @rewritten: the left side is even, as well. what is the problem? – Ross Millikan Jan 21 '14 at 16:33
• The OP says "used the fact that L.H.S. must be odd since R.H.S. is odd" – rewritten Jan 21 '14 at 16:33
• It is actually $m(4m^2+m+12)+3=3p^n$ which gives the factorization $(m^2+3)(4m+1)=3p^n$. – rewritten Jan 21 '14 at 16:40
• I find $m=12,p=7,n=4$ I bet that is the only solution because the exponents are large. – Ross Millikan Jan 21 '14 at 16:46

Hint $\,\ p\mid m^2\!+3,\, 4m\!+\!1\,\Rightarrow\, {\rm mod}\ p\!:\ m\equiv -\frac{1}4\Rightarrow\, 0\equiv m^2\!+3\equiv \frac{49}{16}\,\Rightarrow\, p\mid 49\,\Rightarrow\, p=7$
$(m^2+3)(4^m+1)=3p^n$ and $m=2k$ as you wrote:
Case 1: $3|(4k^2+3)$ so $3|k$
Case 2: Since $k=0,1,2 \mod{3}$ in order for $8k+1=0\mod{3}$ we must have $k=1\mod{3}$