Find all positive integers $n$ for which the equation $$(x^2 + y^2)^n = (xy)^{2016}$$has positive integer solutions.
Problem
Source: New Zealand NZMOC Camp Selection Problems 2016 p7
Tags: diophantine, Diophantine equation, number theory
Source: New Zealand NZMOC Camp Selection Problems 2016 p7
Tags: diophantine, Diophantine equation, number theory
Find all positive integers $n$ for which the equation $$(x^2 + y^2)^n = (xy)^{2016}$$has positive integer solutions.