, 5 tweets, 2 min read
My Authors
Read all threads
What these wondrous numbers giveth with one hand, they taketh with the other.

— Leonardo Bigollo Pisano, Liber Abaci (1202)
Consider the sets K_n of coin tosses that end with HH, but contain no other pair of consecutive heads.

We can modify any such sequence of tosses by:

• (blah)HH → (blah)tHH

or

• (blah)HH → (blah)HtHH

This recursively gives us all of them, and shows why:

|K_n| = F_{n-1}
Sometimes everything generalises beautifully: this all extends to the Tribonacci, Tetranacci numbers etc.

Those generalised Fibonacci numbers count the number of coin toss sequences ending with N heads, but containing no other run of N heads — and total probabilities sum to 1:
The predecessor of the Fibonacci numbers, in the sense that the Tribonacci numbers are their successor, are the Mononacci numbers:

M_0 = M_1 = ... = 1

These count the number of coin toss sequences ending with a single H, but containing no other H.

Σ_{i=1}^∞ M_{i-1}/2^i = 1
If we replace coins with (q+1)-sided dice, everything generalises.

The (p,q)-nacci numbers:

R_{0} = ... = R_{p–2} = 0
R_{p–1} = 1
R_n = q (R_{n–1} + R_{n–2} + ... + R_{n–p})

count sequences that end with p 1s but contain no other runs of p 1s.

Below are some examples for q=2.
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with Greg Egan

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 three 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!