Problem

Source: 2016 KMO Senior P1

Tags: number theory



$n$ is a positive integer. The number of solutions of $x^2+2016y^2=2017^n$ is $k$. Write $k$ with $n$.