(In reply to
Solution by broll)
The problem doesn't ask about M being a multiple of 3 but a power of 3.
mod7 seems to show only that the expression can only be prime if M is a multiple of 3.
Considering mod3 you can also show M must be odd as well.
But I don't see how this rules out other multiples of 3 from potentially working. 15 does not (73 is the smallest prime factor) but I don't know about 21, 33, etc. or even 27 for that matter.

Posted by Jer
on 20160121 07:49:36 