Primes $p$ such that $p^2$ divides $x^2 + y^2 + 1$
Call a prime $p$ awesome if there exist positive integers $x$ and $y$ such that $p^2$ divides $x^2+y^2+1$.
Observation: $2$ is not awesome, because $x^2+y^2+1\not\equiv 0$ (mod $4$). But $3$ is awesome, because $9$ divides $27=5^{2}+1^{2}+1$. So my question is:
Are there infinitely many awesome primes? Can we find all awesome primes?
Motivation: It is true that for every prime $p$, there exists positive integer $x$ and $y$ such that $p$ divides $x^2+y^2+1$. The proof can be found here. (This is actually a nice result; for example, it is used in a proof of Lagrange's $4$-square theorem).
If this is too trivial, what can we say if $p^2$ is replaced by $p^{k}$? :)
Solution 1:
Every odd prime has this property—even if you replace $p^2$ by $p^k$. (pretty awesome, huh)
Find a solution $(x_1,y_1)$ to $x_1^2+y_1^2+1\equiv0\pmod p$; without loss of generality, $p$ doesn't divide $x_1$. Consider the polynomial $x^2+(y_1^2+1)$. This polynomial has a root $x_1$ modulo $p$, and its derivative at that root is $2x_1\not\equiv0\pmod p$. Therefore, by Hensel's lemma, the polynomial $x^2+(y_1^2+1)$ has a root modulo $p^k$ for every $k$ - in fact, a unique root that is congruent modulo $p$ to $x_1$.