There are lots of explanations of the preferred diagonal distribution of prime numbers in the Ulam spiral:
I wonder if these explanations can also explain the observation that when highlighting also "almost-primes" – i.e. numbers $m$ with large enough totient function $\varphi(m)$ (for prime numbers $p$ we have $\varphi(p) = p-1$) – a checkerboard pattern emerges:
Note that the values of $(\varphi(m)+1)/m$ are indicated by different shades of gray, and only numbers $m$ with $(\varphi(m)+1)/m \geq 0.52$ are highlighted.
Note also, that the only numbers that disturb the visible checkerboard are
false positive: $2,4,8,16,32$ (but not $64, 128, 256$)
false negative: $105,165,195,255,285$
This is, how the spiral looks like when all numbers are displayed:
Note that – of course – also numbers $m$ with a small value of the totient function $\varphi(m)$ ("almost non-primes") tend to be arranged along diagonals:
(Only $m$ with $(\varphi(m)+1)/m \leq 0.48$ are highlighted.)



