• Foundation
  • About 15 min
  • 5 practice questions

Virahāṅka–Fibonacci numbers and digits in disguise

Count rhythms made of short and long beats, discover the Virahāṅka rule that each number is the sum of the two before it, and solve puzzles in which letters stand for digits.

If something looks wrong, please tell us.

By the end of this lesson you can

  • Count the ways to fill n beats with 1-beat and 2-beat syllables, and explain why the counts follow the Virahāṅka rule.
  • Extend the sequence 1, 2, 3, 5, 8, … and predict the parity of its terms.
  • Solve simple cryptarithms by reasoning about digits and carries.

One of the most famous sequences in mathematics was first found while studying poetry. In many Indian languages a syllable is short (one beat) or long (two beats). Poets and scholars asked: how many different rhythms fill a given number of beats?

Counting rhythms

Write a rhythm as a sum of 1s and 2s. For 3 beats there are 3 rhythms: 1 + 1 + 1, 1 + 2 and 2 + 1. For 4 beats there are 5: 1 + 1 + 1 + 1, 1 + 1 + 2, 1 + 2 + 1, 2 + 1 + 1 and 2 + 2.

A clever way to count: every rhythm starts with a short syllable (1) or a long one (2). If it starts with 1, the rest is any rhythm of one beat fewer. If it starts with 2, the rest is any rhythm of two beats fewer. So the number of n-beat rhythms = (number of (n − 1)-beat rhythms) + (number of (n − 2)-beat rhythms).

The 8 rhythms of 5 beats

  • Start with a short syllable (1 beat)
    • Then any 4-beat rhythm
    • 5 ways
  • Start with a long syllable (2 beats)
    • Then any 3-beat rhythm
    • 3 ways
5 + 3 = 8 rhythms in all
Number of rhythms for each number of beats
Beats12345678
Rhythms12358132134

The Prakrit scholar Virahāṅka, around 700 CE, described this rule for forming the numbers, building on earlier work on Sanskrit rhythm. The same numbers became known in Europe through Fibonacci, who wrote about them in 1202 CE, so they are often called the Virahāṅka–Fibonacci numbers. They turn up in art, music and nature; for example, the number of petals on many flowers is one of these numbers.

Virahāṅka numbers: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, … Each number is the sum of the two before it.

Worked example 1: extending the sequence

After 34 and 55: 34 + 55 = 89, then 55 + 89 = 144, then 89 + 144 = 233. Going backwards also works: before 34 and 55 comes 55 − 34 = 21.

Worked example 2: parity pattern

Parities: 1 odd, 2 even, 3 odd, 5 odd, 8 even, 13 odd, 21 odd, 34 even, … Why? odd + even = odd, then even + odd = odd, then odd + odd = even, and the cycle starts again. So the parities repeat in a cycle of three, and every third term (the 2nd, 5th, 8th, 11th, …) is even.

Worked example 3: tiling a path

A path 6 squares long is covered with small tiles (1 square each) and long tiles (2 squares each). Each covering is like a 6-beat rhythm, so there are 13 ways.

Digits in disguise

In a cryptarithm, each letter stands for a digit; the same letter is always the same digit and different letters are different digits.

Worked example 4: E + E + E + E + E = FE

Five times E is a 2-digit number ending in E. So 5 × E − E = 4 × E must be a multiple of 10, which means E is 0 or 5. E = 0 gives 0, not a 2-digit number, so E = 5 and 5 × 5 = 25 gives F = 2.

Worked example 5: AB + B = BA

A 2-digit number AB plus its units digit B gives the number with its digits swapped. In place-value form: 10A + B + B = 10B + A, so 9A = 8B. Since A and B are single non-zero digits, A must be 8 and B must be 9. Check: 89 + 9 = 98.

Key takeaways

Key takeaways: Rhythms of 1-beat and 2-beat syllables are counted by the Virahāṅka numbers 1, 2, 3, 5, 8, 13, …, where each is the sum of the two before. Every third number in the sequence is even. In cryptarithms, use place value, carries and the last digit to narrow down which digit each letter can be.

Check your understanding

  1. 1. What number comes after 55 and 89 in the Virahāṅka sequence?

    1. 144
    2. 134
    3. 124
    4. 178
    Show answer

    Answer: A. Each number is the sum of the two before it: 55 + 89 = 144.

  2. 2. How many rhythms of 7 beats can be made from short (1-beat) and long (2-beat) syllables?

    1. 13
    2. 14
    3. 34
    4. 21
    Show answer

    Answer: D. Rhythms of 7 beats = rhythms of 6 beats + rhythms of 5 beats = 13 + 8 = 21.

  3. 3. The Virahāṅka sequence is 1, 2, 3, 5, 8, 13, … Is its 15th number even or odd?

    1. Even
    2. Odd
    3. It cannot be told without finding it
    4. Neither
    Show answer

    Answer: B. The even terms are the 2nd, 5th, 8th, 11th, 14th, … (every third term starting from the 2nd). The 15th is not among them, so it is odd. (It is 987.)

  4. 4. In the cryptarithm AB + B = BA, A and B are different non-zero digits. What are they?

    1. A = 9, B = 8
    2. A = 1, B = 2
    3. A = 8, B = 9
    4. A = 4, B = 5
    Show answer

    Answer: C. 10A + B + B = 10B + A gives 9A = 8B, so A = 8 and B = 9. Check: 89 + 9 = 98. The others fail, e.g. 45 + 5 = 50, not 54.

  5. 5. A strip 5 squares long is covered with 1-square tiles and 2-square tiles. In how many different ways can it be covered?

    1. 8
    2. 5
    3. 10
    4. 13
    Show answer

    Answer: A. This is the number of 5-beat rhythms: 1, 2, 3, 5, 8 for strips of 1 to 5 squares, so 8 ways.

Sign in to keep track of the lessons you finish.

Next lesson → Final self-assessment: Number Play

Privacy · Terms · Refunds · Delivery