My Authors
Read all threads
Okay, follow through with me on this one and I guarantee you're in for a fun surprise.

We'll start forming rows of numbers, kind of like Pascal's triangle, but with a different rule.

The first row is simple "1, 1"
For row 2, copy the first row, but insert a 2 between any elements that add to 2.

In this case that just means sticking a 2 between the two 1's.
For row 3, copy row 2, but insert a 3 between every pair of elements adding to 3.
And so on...

The rule for row n is to copy row n-1, but insert the number n between any two successive elements that add up to n.
So far we've just been growing two at a time, but the 5th row has a few more insertions.
Only two insertions for row 6.

(Can you feel the suspense! What will the surprise be...)
Row 7 gives a little more excitement, adding 6 new elements.
Let's keep going a little more...
And with 9 rows to fill the screen, I want you to count how many elements there are in each row.
2
3
5
7
11
13
19
23
29
All primes! Though 17 is bizarely getting shafted by the whole affair.

I just saw this in Richard Guys "The Strong Law of Small Numbers" (which I was looking at via @AlexKontorovich and @lpachter).
Sadly, it breaks with the next row, whose length is 33.

Also sadly, I don't have a very good answer for what's going on. There's a nice partial answer, but not one that leaves us with much satisfaction for what primes are doing here, other than to say "coincidence".
These numbers are all denominators in the Farey sequences: en.wikipedia.org/wiki/Farey_seq…

The rule for generating new rows above is just a cute fact arising from how the fraction sitting between (a/b) and (c/d) in such a sequence looks like (a+c)/(b+d).
A Farey sequence of order n includes all rational numbers between 0 and 1 (inclusive) with a denominator smaller than n, in sorted order. For example:

0/1, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1/1.
The upshot is that the n'th row will have phi(n) more elements than the last, where phi is Euler's totient function. This is another way of saying "how many reduced fractions between 0 and 1 have a denominator n?".
For example, with 6 the only such fractions are 1/6 and 5/6, which is why the 6th row above only inserted two 6s. But for 7, we have 1/7, 2/7, 3/7, 4/7, 5/7 and 6/7, which is where there are six 7's inserted in the 7th row above.
From there, we have this strange fact that 1 + [phi(1) + phi(2) + ... + phi(n)] happens to be prime for n between 1 and 9.

(Also, fun fact, the length of a Farey sequence asymptotically approaches 3*n^2 / pi^2)
I'm willing to concede this is just a "coincidence", in that the gaps between small primes are mostly 2's and 4's, maybe a 6 sprinkled in as well, and the same is true of phi(n) for small n.

There can only be so many patterns among small numbers, so some are bound to collide.
But do any of you know of a nicer explanation for why this small number coincidence "should" be true?
Missing some Tweet in this thread? You can try to force a refresh.

Keep Current with Grant Sanderson

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!