Suppose that positive integers $m, n, k$ satisfy the equations $$m^2 + 1 = 2n^2,$$ $$2m^2 + 1 = 11k^2.$$ Find the residue when $n$ is divided by $17$.

Let's think step by step and output the final answer within \boxed{}.
user