Find all non-negative integers $n$ for which the equation \[ {\left( x^2 + y^2 \right)}^n = {(xy)}^{2018} \]admits positive integral solutions.
Source: 2018 Pan-African Shortlist - N7
Tags: number theory, Diophantine equation
Find all non-negative integers $n$ for which the equation \[ {\left( x^2 + y^2 \right)}^n = {(xy)}^{2018} \]admits positive integral solutions.