Problem

Source: Iran 3rd round 2013 - Number Theory Exam - Problem 4

Tags: algebra, polynomial, Vieta, number theory proposed, number theory, Diophantine equation, Pell equations



Prime $p=n^2 +1$ is given. Find the sets of solutions to the below equation: \[x^2 - (n^2 +1)y^2 = n^2.\] (25 points)