TITLE: Why is $a^2+b^2$ more likely to be prime than $a^2+b$?
QUESTION [10 upvotes]: This is only based on empirical testing, but it seems like if you select a random $a^2$ and a random $b$ in a comparable range, you'll find that $a^2+b^2$ is significantly (by a margin of 25-30%) more likely to be prime than $a^2+b$. I assume there's a good number-theoretical reason for this, but it doesn't jump out at me, aside from karmic balance for the fact that $a^2-b^2$ is almost never prime.

Came by to post this addendum:
My position can be better defined by saying that there are strictly more primes of form $a^2+b^2$ than $a^2+b$, where $a>b$ and you tabulate your prime count for all valid $a,b\in\mathbb N$ pairs up through $a=17$ or greater.

REPLY [5 votes]: Say $1\leq a, b\leq N$, then
$$
a^2+b\leq N^2+N\qquad\text{and}\qquad a^2+b^2\leq2N^2.
$$
But while every prime $p$ is of the form $a^2+b$ (just take $a=1$, $b=p-1$) only those congruent to $1$ modulo $p$ are of the form $a^2+b^2$.
Thus by the prime number theorem (which says that there are about $x/\log x$ primes $\leq x$) the probability to hit a prime for random values of $a^2+b$ is
$$
p_1=\frac{\log(N^2+N)}{N^2+N}=\frac{\log(N)+\log(N+1)}{N(N+1)}
$$
while the probability of hitting a prime of the form $a^2+b^2$ is
$$
p_2=\frac12\frac{\log(2N^2)}{2N^2}=\frac12\frac{\log(2)+2\log(N)}{2N^2}
$$
where the factor $\frac12$ is there because the primes $\equiv1\bmod4$ have density $\frac12$.
Note that $p_1>p_2$.