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