# Ulam spiral and triangular numbers

Is there any explanation for the twister-like pattern build by triangular numbers $$\Delta_n = \frac{n\cdot(n+1)}{2}$$ in the Ulam Spiral?

Here for $$1,\ldots,100$$: Here's a picture with many more turns of the spiral, at which point the pattern seems to have settled on $$17$$ "arms." Why $$17$$?

Here are two of these arms: $$10, 28, 55, 91, 136, 190, 253, 325,...$$ and $$6, 21, 45, 78, 120, 171, 231, 300,...$$

• The intuitive idea is that triangular numbers exhibit quadratic growth, which means that these numbers "should" lie nicely on Ulam's spiral. – Wojowu Jun 23 '15 at 16:41
• Rewrite the formula as $\frac{n^2 + n}{2}$. Also compare the behavior of the square numbers. – Robert Soupe Jun 24 '15 at 2:55
• @Wojowu Well, but "to lie nicely" means not necessarily a "twister". – georgmierau Jul 7 '15 at 12:08
• Please explain what you mean by "twister-like pattern." – Barry Cipra Jul 7 '15 at 12:24
• @GeMir, ah thanks, that helps. I've added that figure to your question, along with an observation about the number of arms, which struck me as curious. If you don't like the added question, feel free to remove it. But I think it might serve as a spur for someone to explain what's going on. (If I can find the time, I'll give it some thought myself, but I suspect someone'll beat me to it.) – Barry Cipra Jul 7 '15 at 13:35