Find all non-negative integers $x, y$ such that:

$$
2^{x}=y^{2}+y+1
$$
The left side of the equation is even if $x>0$. The right side is always odd: indeed $y$ and $y^{2}$ have the same parity, their sum is therefore even, so $1+y+y^{2}$ is always odd.

If $x=0$, then it is necessary and sufficient that $1+y+y^{2}=1$ with $y \geqslant 0$ so the only solution is $x=y=0$.

## Congruences

Definition, compatibility with addition and multiplication.