Where Fermat's last theorem fails
Solution 1:
$$(18+17\sqrt2)^3+(18-17\sqrt2)^3=42^3$$ so Fermat fails for $n=3$ in the UFD ${\bf Q}(\sqrt2)$. $$(1+\sqrt{-7})^4+(1-\sqrt{-7})^4=2^4$$ so Fermat fails for $n=4$ in the UFD ${\bf Q}(\sqrt{-7})$.
Looking at a couple more of the imaginary quadratic UFDs:
$(1+\sqrt{-2})^{\color{blue}{3}}+(\sqrt{-2})^{\color{blue}{3}}=(1-\sqrt{-2})^{\color{blue}{3}}$ (failure in ${\bf Q}(\sqrt{-2})$)
$(1+\sqrt{-3})^{\color{blue}{6n+1}}+(1-\sqrt{-3})^{\color{blue}{6n+1}}=2^{\color{blue}{6n+1}}$ (any whole number $n$ at all; failure in ${\bf Q}(\sqrt{-3})$)
Solution 2:
You can also blow FLT out of the water in $p$-adics. Consider the ordinary Pythagorean triple
$17^2+144^2=145^2$
Render these arguments in $2$-adics: $17$ and $145$ are each one greater than a multiple of $8$, thus squares of other $2$-adic integers which I shall call $\pm m$ and $\pm n$ respectively (an additive inverse pair of choices for each). And of course $144$ is the square of $\pm 12$. So then we have eight $2$-adic equations (four of them "linearly independent") of the form
$(\pm m)^{\color{blue}{4}}+(\pm 12)^{\color{blue}{4}}=(\pm n)^{\color{blue}{4}}$