Quadratic polynomials describe the diagonal lines in the Ulam-Spiral I'm trying to understand why is it possible to describe every diagonal line in the Ulam-Spiral with an quadratic polynomial $$2n\cdot(2n+b)+a = 4n^2 + 2nb +a$$ for $a, b \in \mathbb{N}$ and $n \in 0,1,\ldots$.
It seems to be true but why? 
Wikipedia says: "The pattern also seems to appear even if the number at the center is not 1 (and can, in fact, be much larger than 1). This implies [WHY?] that there are many integer constants b and c such that the function: $4n^2+bn+c$ as $n$ counts up $\{1, 2, 3, ...\}$, a number of primes that is large by comparison with the proportion of primes among numbers of similar magnitude."
I can't find a source with a detailed explanation.

I found these equations:

So here is the solution:
\begin{align*}
 y_t - y_{t+1} - (y_{t+1} - y_{t+2}) &= 8\\
 y_t - 2y_{t+1} + y_{t+2} &= 8\\
 y_{t+2} - 2y_{t+1} + y_t &= 8
\end{align*}
1) We solve $y_{t+2} - 2y_{t+1} + y_t = 0.$ 
Let $y_t = A\beta^t$ \begin{align*}
 A\beta^{t+2} - 2A\beta^{t+1} + A\beta^t &= 0\\
 A\beta^{t}\cdot (\beta^2 - 2\beta + 1) &= 0
\end{align*} 
$\beta^2 - 2\beta + 1 = 0$ has two identical solutions $\beta_{1,2} = 1$.
So with $A_1$ and $A_2t$ we get $$y_t = A_1 + A_2t.$$
2) $1 + a_1 + a_2 = 0$ and $a_1 = -2$ so let $y_t = ct^2$
\begin{align*}
 c\cdot(t+2)^2 - 2c\cdot(t+1)^2 + ct^2 &= 8\\
 c\cdot\big(t^2+4t+4 - 2\cdot(t^2+2t+1) + t^2\big) &= 8\\
 c\cdot(t^2+4t+4 - 2t^2-4t-2 + t^2) &= 8\\
 2c &= 8\\
 c &= 4
\end{align*}
So $y_t = 4t^2$
3) The complete solution is $$y_t = 4t^2 + A_2t + A_1.$$
The "exclusion lines" seem to be interesting too:
$$4n^2+n$$ $$4n^2+3n$$ $$4n^2+3n-1$$ $$4n^2-n$$ seem not to have any primes at all.
Useful website I found a bit late: http://ulamspiral.com
 A: Note that the first "ring" of numbers has just 1 number in it, the next ring has $9-1=8$ numbers, then $25-9=16$, $49-25=24$, $81-49=32$, and so on. These numbers (aside from the first) are increasing by 8. When you start somewhere and go out along a diagonal, with each step you increase by 8 more than you did with the previous step. That is, the second difference of the sequence as you go out along a diagonal is a constant 8; $a_{n+2}-2a_{n+1}+a_n=8$. And the general solution of that difference equation ("recurrence relation") is $a_n=4n^2+bn+c$. 
A: One of the most important questions here seems to be why some quadratic polynomials are richer in primes than others. Because the primes are recursive, prime-rich functions tend to not produce multiples of small primes. This can be derived using modular arithmetic. For instance, Euler's function (n^2 + n + 41) begins with 41 and then has term-to-term differences of all the even numbers. 2, 4, 6, ...
The remainder modulo 7 thus starts at 6, and cycles like this:
6, 1, 5, 4, 5, 1, 6, 6, 1, 5, 4, 5, .... and this proves that Euler's equation never yields a multiple of 7 (it would have a remainder of 0).
I have used sieving and other techniques to discover quadratic equations with very few solutions modulo small primes. Significantly denser than Euler's formula is n^2 + n + 247757. Equations of the type n^2 + n + C are split on the Ulam Spiral - one diagonal line is for odd n and the other for even n.
Dario Alpern has an applet for the Ulam Spiral - try entering 247757 into the starting number here and zooming out:
https://www.alpertron.com.ar/ULAM.HTM
A: Reading georgmierau comment, I've been trying to reach this "arbitrary" 8, so here what I've done:
Let $A(n)$ be the cardinal number of the $n^{th}$ ring in Ulam's spiral.
$$A(1)=1\\A(2)=8=(2\cdot2-1)^2-1^2\\A(3)=16=(2\cdot3-1)^2-3^2\\ \vdots \\ A(n)=(2n-1)^2-(2n-3)^2\Rightarrow A(n)=8n-8, n\neq1$$
So, $A(n+1)-A(n)=8$
That means that each time we pass to the next ring, its cardinal number will be the same of the last one added by 8.
