Rewriting the given equation we have
4m3+m2+12m+3=3pn.
L.H.S.=(4m+1)(m2+3).
Suppose that (4m+1,m2+3)=1. Then (4m+1,m2+3)=(3pn,1),(3,pn),(pn,3) or (1,3pn), a contradiction since 4m+1,m2+3≥4.
∴(4m+1,m2+3)>1.
Since 4m+1 is odd, we have (4m+1,m2+3)=(4m+1,16m2+48)=(4m+1,49)=7 or 49.
∴p=7, and 4m+1=3.7k or 7k for some natural number k.
If (4m+1,49)=7, then we have k=1 and 4m+1=21 which does not lead to a solution.
∴(4m+1,m2+3)=49.
If 73 divides 4m+ 1 then it does not divide m2+3, so we get m2+3≤3⋅72<73≤4m+1. This implies (m−2)2<2, so m≤3, which does not lead to a solution.
∴4m+1=49
∴m=12 and n=4.
Thus (m,n,p)=(12,4,7) is the only solution.