In 1752 Goldbach send this conjecture to Euler: "Every odd integer can be written in the form $p+2a^2$ where $p$ is a prime or $1$ and $a$ is a natural number (can be even 0)." This conjecture turned out to be false and my book asks me to prove that $5777$ cannot be written in such manner.
What I did is simply noted that if exists such $p$ it must be of the form $5777-2a^2$ and so $a$ mustn't be greater than $53$. Then I simply checked that for every values of $a$ from $0$ to $53$ $p$ is not prime.
Btw this is a very tedious way to prove this and may in a test I wouldn't be able to do this so I was wondering if there was any shorter way? (or my book just wanted me to make a lot of calculations for some reason.)
Observe that $5777\equiv 2\pmod 3$ and $2a^2\equiv 2\pmod 3$ unless $3\mid a$. Hence once you check that $5777-3$ is not twice a square, you need only check $a$ with $3\mid a$ (cutting down the effort by two thirds).
Likewise, $5777\equiv 2\pmod 5$, which allows you to drop all cases where $a\equiv \pm1\pmod 5$ (after checking that $5777-5$ is not twice a square).