Going through an old post of mine from 2014, I realized there was a curiosity that hasn't been fully explained up to now. Consider the following simple prime-generating polynomials. (My thanks to user25406 for the simpler form.)
$$F_1(n)=(2n+1)^2-398$$ $$F_2(n)=(2n+1)^2-4\times398$$ $$\;F_3(n)=(2n+1)^2-16\times398$$ $$\,F_4(n)=2(2n+1)^2-\tfrac12\times398$$
The discriminant (square-free) of these quadratics is $d=398.$ This is the largest even $d$ of real quadratic fields with class number 1 and related cfrac of period 4. (A050953)
Just like Euler's $F(n) = n^2+n+41=\big(n+\frac12\big)^2+\frac{163}4$, the four polynomials above are remarkably good at producing primes (counting negative values):
$$\begin{array}{|c|c|c|c|} \hline F_k(n)&\text{Range of n}&\text{Total primes}\\ \hline F_1(n)& 0\text{ to }26& 27\\ \hline F_2(n)& 1\text{ to }35& \color{red}{35}\\ \hline F_3(n)& 23\text{ to }53& 31\\ \hline F_4(n)& 0\text{ to }30& 31\\ \hline \hline \end{array}$$
with the second almost catching up with the 40 primes of Euler's polynomial. Here is is a plot of the first three (which are just squares of odd numbers subtracted by $398\times4^m$),
For period 1 and 3, see "Relatives of Heegner numbers?"
For period 2, see "Prime-generating polynomials like $F(n) = 7n^2+49n+41$?"
Questions:
- Being class number 1 probably helps, but what is it that makes $d=398$ so special it is involved in four similar polynomials very good at producing primes within a range? (The cfrac expansion of $\sqrt{398}$ is $19;\overline{1,18,1,38},$ hence has period 4.)
- I tested $e^{\pi\sqrt{398}}$ and is nothing remarkable. After all, the j-function $j(\tau)$ uses complex arguments $\tau$. So is there some special function that uses real arguments involving $\sqrt{398}$ such that we get a Ramanujan-type result similar to $e^{\pi\sqrt{163}} \approx 640320^3$?
