About a variant of Ulam spiral I asked this on Math.SE but got no answer:
Here on Wikipedia, I read about a variant on the Ulam spiral:

[A] structure may be seen when composite numbers are also included in
the Ulam spiral. [...]  Using the size of the dot representing an
integer to indicate the number of factors and coloring prime numbers
red and composite numbers blue produces the figure shown.

The figure below is the resulting spiral:

Questions:

*

*Is it surprising that there are thick diagonals? (Stated in the same manner as is stated about the original one,) is it surprising that there are quadratics which generate surprisingly large number of composites with many divisors? Isn't there a simple explanation?


*How exactly do the variant and the original spirals relate? Thinking only about the dots and not their colors, the primes and the composites with very few divisors are not distinguishable in the variant.
 A: Notice that the numbers $n^2$ and $n^2+n$ are very close to the diagonals, and it is natural that they have much more divisors than average numbers of the same size. Similarly, whenever we have a quadratic of the form $(n+a)(n+b)$, it should not be a surprise that it produces numbers with a lot of divisors.
One simple reason for some irreducible quadratics to have more primes than others is the following: if we for instance have the quadratic $n^2+900$, then it can only be prime when $n$ is coprime to $30$ , which restricts the values of $n$ quite much, so there should not be even nearly as many such primes as there are of the form $n^2+1$, say.
If you are interested in less trivial cases, then the conjecture of Hardy and Littlewood conserning primes represented by quadratics, that is, $\{n\leq x: an^2+bn+c \quad \text{prime}\}\sim\frac{A}{\sqrt{a}}\frac{\sqrt{x}}{\log x}$, where $A$ is a certain product, would explain why some quadratics generate a lot more primes than others.
To explain the conjecture, I suppose you could look at quadratic fields (see also the original paper by Hardy and Littlewood).  For example, in the case of the polynomial $n^2+1$ you could consider the Gaussian integers, and then the question would just be: How often $n+i$ and $n-i$ are simultaneously prime in $\mathbb{Z}[i]$? Taking into account certain divisibility obstructions and the prime number theorem in $\mathbb{Z}[i]$, you should arrive at the asymptotic.
It should of course be also true that the polynomials which produce few primes also tend to produce numbers that have more divisors, and perhaps one could use similar arguments to derive a conjecture about that.
