Problem

Source: Iranian Third round 2015 - Number theory exam - Problem 5

Tags: number theory, prime numbers



$p>30$ is a prime number. Prove that one of the following numbers is in form of $x^2+y^2$. $$ p+1 , 2p+1 , 3p+1 , .... , (p-3)p+1$$