A generalized Fermat equation is a generalization of the equation whose solution is desired in Fermat's last theorem
to
for positive integers ,
,
, and
,
with
a fixed positive integer parameter and trivial
solutions having
,
, or
excluded.
is trivial to solve by taking
and
.
is more difficult, but can be solved by noting that solutions exist iff
can be written as a sum of two squares of nonnegative
integers. The first such values of
are 1, 2, 4, 5, 8, 9, 10, 13, 16, 17, 18, 20, 25, 26, ...
(OEIS A001481).