Second longest prime diagonal in the Ulam spiral?

Given the Ulam spiral with center $c = 41$ and the numbers in a clockwise direction, we have,


The main diagonal is defined by Euler’s polynomial $F(n) = n^2+n+41$, and yields distinct primes for 40 consecutive $n = 0\,\text{to}\,39$.

If we let $c = 3527$ as in this old sci.math post, we get,


The polynomial is $G(n) = 4n^2-2n+3527$ and is prime for 23 consecutive $n = -2\,\text{to}\,20$. Its square-free discriminant is $d = -14107$ and has class number $h(d) = 11$. This is the 3rd largest (in absolute value) with that $h(d)$. The blue number, $G(-3)=3569$ is not prime.

Question: For $F(n) = n^2+n+p$, the record is held by Euler’s polynomial. For the form $G(n) = 4n^2\pm 2n+p$, is there a better one?

P.S. Other polynomials such as $F(n) = 6n^2+6n+31$ are prime for $n=0\,\text{to}\,28$, but are not diagonals in the Ulam spiral.

Solutions Collecting From Web of "Second longest prime diagonal in the Ulam spiral?"

(Updated.) Knowing more Mathematica coding, I re-visited this old question. Given,

$$P(n) = 4n^2\pm2n+p\tag1$$

I searched the first $million$ primes $p$. The complete table of record $P(n)$ with at least $14$ consecutive $n$ in the range $n = -5 \to 60\,$ yielding primes are in the table below.

\text{#} & P(n)=an^2+bn+c & d = b^2-4ac & h(d) & Prime\; range\; n &Total\,(T)\\
1& 4n^2-2n+41 &\color{red}{-163} & 1&-19 \to 20& 40\\
2& 4n^2-2n+3527 &\color{blue}{-14107} & 11&-2 \to 20& 23\\
3& 4n^2+2n+21377 &\color{red}{-85507} & 22&47 \to 64& 18\\
4& 4n^2-2n+9281 &\color{red}{-37123} & 17& 0 \to 16& 17\\
5& 4n^2-2n+17 &\color{blue}{-67} & 1&-7 \to 8&16\\
6& 4n^2+2n+41201&\color{red}{-164803} & 32& 52 \to 66& 15\\
7& 4n^2+2n+12821&-51283& 21& 8 \to 21& 14\\
8& 4n^2-2n+3461 &\color{red}{-13843} & 10&34 \to 47&14\\
9& 4n^2-2n+1277 &\color{blue}{-5107} & 7&19 \to 32&14\\

If the discriminant $d$ in red, then it the largest $|d|$ of a class number $h(d)$. If it is in blue, then is one of the $3$ largest $|d|$ of that class.

For example, using #3, if you have an Ulam spiral with center $c=21377$, then in its main diagonal there are $18$ primes in a row. It involves $d = -85507$ which is the largest $|d|$ with $h(d) = 22$.

P.S. Considering that the millionth prime is $p(10^6) = 15485863$,
it seems odd there are no large $p$ found within the search radius. However, I only searched $n = -5\to 60$, so another choice of range might yield other $P(n)$.