True. We have
But I think these are the only solutions.
What's important in the fact that is that it's not possible that 7|m (you can do this very easily with a very short proof by contradiction). Thus gcd(7,m)=1 and we can apply Euler's theorem :
And
So
And since , it follows that .
So 343 is the number you're looking for.