How would I go about proving
$$ a \equiv b\pmod{m}$$ given
$$ a \equiv b\pmod{m^2} $$
I suspected this was false, so I tried to find a counterexample using a program, and there does not appear to be a counterexample for $m$ in (2, 16).
What I have tried so far: $$ a \equiv b\pmod{m^2} $$ $$ a = b + m^2k $$ $$ a - b = m^2k $$ $$ \sqrt{a - b} = \sqrt{m^2k} $$
Which would imply that $\sqrt{a-b} \equiv 0\pmod{m}$ assuming that $k$ is a perfect square. It feels like I'm barking up the wrong tree, however, and I'm not sure where to go from here.
\pmod{m}and\pmod{m^2}; it provides the spacing, parentheses, and correct typesetting. – Arturo Magidin Apr 21 '21 at 18:14