Question: Can every non-zero integer be written in the following form? $$p-x^2$$
I was thinking about if every non-zero integer could be written in the form $p-x^2$ where $p$ is a prime and $x$ is a positive integer so I ran a bit of code in python to see if there was a chance it may be true and it seemed promising.
I haven't seen the problem asked anywhere else so i thought I'd ask for help in proving (or maybe disproving) the result.
The problem is equivalent to asking for which values of $n$ the function $f(x):\mathbb Z \rightarrow \mathbb Z$ given by $f(x) = x^2+n$ hits at least one prime value.
For positive $n$ we might think it does because of Bunyakovsky's conjecture (also, the case $n=1$ is Landau's fourth problem).
For $n=0$ it doesn't.
For negative $n$ that isn't of form $-k^2$ we would think it does because of Bunyakovsky's conjecture.
For negative $n$ of form $-k^2$ it is equivalent to $2k+1$ not being a prime.