I am currently taking a course on optimisation and the lecturer has said that it is possible to pose Fermat's Last Theorem ($a^n + b^n = c^n,\ n > 2$ has no solutions in the integers) as an optimisation problem, however he said no more on it.

How exactly can this be done?