# Beyond Fibonacci: 7 Other Amazing Math Sequences

Ask anyone to name a mathematical sequence and chances are they'll recite "1, 1, 2, 3, 5, 8..." the first several terms of the Fibonacci sequence. Each term is the sum of the two previous terms, what is known as a recursive sequence. People feel pretty clever for knowing the Fibonacci sequence, even cleverer for knowing Leonardo di Pisa discovered it in relation to a problem about rabbit procreation, but it is only one among thousands of interesting sequences in number theory, computing, and other branches of mathematics.

Not all sequences in math and nature are recursive. For example, in the prime number sequence 2, 3, 5, 7, 11, 13, 17,... there is no way to determine the next prime number from the previous terms. People have been studying prime numbers since antiquity and there are still many unsolved problems and unproven conjectures about primes.

If you like recursive integer patterns and want to expand your knowledge beyond the Fibonacci numbers, here are seven more fascinating sequences.

## Yellowstone Permutation Integer Sequence

Like all the sequences discussed in this article, the Yellowstone sequence is recursively defined. Let Y(n) be the nth term of the sequence and set Y(1) = 1, Y(2) = 2, and Y(3) = 3. For values of n greater than 3, Y(n) is defined to be the smallest positive integer that satisfies the following conditions:

- has not already appeared in the sequence
- has no common factors with Y(n-1), other than 1
- has a common factor with Y(n-2), other than 1

Let's apply these rules to find the next several terms of the series. The fourth term must have no common factors with 3 but some common factor with 2, be as small as possible, and not already in the sequence. This leaves only 4, thus Y(4) = 4.

The fifth term must have no factors in common with 4, some factor in common with 3, be as small as possible and not already in the sequence. This means Y(5) = 9.

The sixth term must have no factors in common with 9, some factor in common with 4, be as small as possible and not already in the sequence. This means Y(6) = 8.

Following the procedure above you can work out the first 60 terms: 1, 2, 3, 4, 9, 8, 15, 14, 5, 6, 25, 12, 35, 16, 7, 10, 21, 20, 27, 22, 39, 11, 13, 33, 26, 45, 28, 51, 32, 17, 18, 85, 24, 55, 34, 65, 36, 91, 30, 49, 38, 63, 19, 42, 95, 44, 57, 40, 69, 50, 23, 48, 115, 52, 75, 46, 81, 56, 87, 62...

Superficially it looks like a list of numbers in no particular order. The reason why it is called the Yellowstone* permutation* sequence is that every positive integer occurs exactly once in the sequence. In other words, the entire sequence is a permutation of the positive integers. This was proven very recently in 2015.

The reason why it is called the *Yellowstone* permutation is because when you plot Y(n) as a function of, the resulting graph has many sharp peaks, somewhat resembling geysers, which are found in Yellowstone National Park. Below is a graph of the sequence with n on the horizontal axis and Y(n) on the vertical axis.

## The Lucas Numbers

The Lucas sequence is a sibling of the Fibonacci sequence. The nth Lucas number L(n) is defined exactly the same way as the nth Fibonacci term, i.e., by adding the two previous terms. In math notation, L(n) = L(n-1) + L(n-2). But instead of starting with the values F(0) = 0 and F(1) = 1 as the Fibonacci sequence does, the Lucas sequence starts with L(0) = 2 and L(1) = 1. Running the recursion gives you

2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, 322, 521, 843, 1364, 2207, 3571, 5778,...

These numbers were extensively studied by François Édouard Anatole Lucas. Just as with the Fibonacci numbers, the ratio of consecutive terms in the Lucas sequence converges to the Golden Mean φ, equal to (1 + sqrt(5))/2 ≈ 1.61803... The Lucas numbers have some other curious properties.

- Every prime number p divides some Fibonacci number F(n), where n > 0, however, there are many primes that do not divide any Lucas number. For example, no Lucas number is divisible by 5 or 13.
- If q is a prime number, then the qth Lucas number L(q) is not divisible by q. In fact, L(q) divided by q always has a remainder of 1.
- No Lucas number is divisible by a Fibonacci number except 1, 2, and 3.
- L(2n) = L(n)^2 ± 2 (plus if n is odd and minus if n is even.) For example, L(6) = 18; if you square this number and subtract 2 you get 322, which is equal to L(12).
- L(n)^2 ± 5 = L(n-1)*L(n+1), with plus if n is odd and minus if n is even. In other words, if you square a Lucas number and add or subtract 5, you get the product of the two surrounding Lucas numbers. For example, L(7) = 29, L(7)^2 + 5 = 846, and 846 is the product of 18 and 47.
- The last digits of the Lucas numbers repeat in a pattern with a cycle length of 12. These digits are 2, 1, 3, 4, 7, 1, 8, 9, 7, 6, 3, 9...
- Just like the Fibonacci numbers, there is a Binet-like formula for computing the nth Lucas number directly, without having to work out the previous terms. This is shown in the image below.

## Look-and-Say Sequence

The look-and-say sequence is often found in "what is the next term" type of puzzles. If the sequence starts with 1, the next several terms are

11, 21, 1211, 111221, 312211, 13112221, 1113213211, 31131211131221,...

If the sequence starts with 2, the next several terms are

12, 1112, 3112, 132112, 1113122112, 311311222112, 13211321322112,...

To generate successive terms in this sequence you look at the previous term and describe it in words. Taking 132112 as an example, its description is

one "1," one "3," one "2," two "1s," and one "2"

Replacing the words with digits and concatenating the whole thing gives you 1113122112, which is the next term in the sequence. Depending on the initial value, the sequence has many interesting properties.

- If the initial value is 1, then the last digit of every term will be 1.
- If the initial value is 1, then no term will ever have "333" in it.
- If the initial value is 1 or 2, then the only digits that will appear in the terms are 1, 2, and 3.
- If the initial value is 2, then all terms after the fourth will end in "2112."
- If the initial value is 1 or 2, then every term after the first will have an even number of digits.
- The ratio of the lengths (number of digits) of consecutive terms has a limiting value of approximately 1.303577. In other words, each new term has, on average, approximately 30.3577% more digits than the preceding term. The exact value of this number is the root of a very long polynomial expression, which was proven by mathematician John Conway.

## Padovan Sequence and Perrin Sequence

In number theory, the Padovan and Perrin sequences are sometimes called "skiponacci" numbers because each term in the sequence is the sum of two previous terms, skipping the preceding term. In other words, if three consecutive terms are A, B, C, then the next term is A+B. In mathematical notation, if P(n) is the nth Padovan or Perrin number, then P(n) = P(n-2) + P(n-3). The difference between the Padovan and Perrin Sequences are the initial values.

The Padovan sequence P_{dv}(n) starts with the three initial values of P_{dv}(0) = 1, P_{dv}(1) = 1, P_{dv}(2) = 1. The first 50 terms of the sequence are

1, 1, 1, 2, 2, 3, 4, 5, 7, 9, 12, 16, 21, 28, 37, 49, 65, 86, 114, 151, 200, 265, 351, 465, 616, 816, 1081, 1432, 1897, 2513, 3329, 4410, 5842, 7739, 10252, 13581, 17991, 23833, 31572, 41824, 55405, 73396, 97229, 128801, 170625, 226030,...

The Perrin sequence P_{rn}(n) starts with the three initial values P_{rn}(0) = 3, P_{rn}(1) = 0, P_{rn}(2). The first 50 terms of the Perrin sequence are

3, 0, 2, 3, 2, 5, 5, 7, 10, 12, 17, 22, 29, 39, 51, 68, 90, 119, 158, 209, 277, 367, 486, 644, 853, 1130, 1497, 1983, 2627, 3480, 4610, 6107, 8090, 10717, 14197, 18807, 24914, 33004, 43721, 57918, 76725, 101639, 134643, 178364, 236282, 313007, 414646, 549289, 727653, 963935, 1276942,...

Both sequences have some very curious mathematical properties.

- If q is a prime number, then the qth term of the Perrin sequence is divisible by q. For example, the 17th term of the Perrin sequence is 119, which can be divided evenly by 17.
- The last digits of both the Padovan and Perrin sequences repeat in a pattern with a cycle length of 168.
- The ratio between consecutive terms in the Padovan and Perrin sequences approaches a limiting value of 1.34271795724..., which is an irrational number called the "plastic constant." The plastic constant is the real-valued root of the cubic equation x^3 - x - 1 = 0.
- The Padovan numbers have a geometric connection. The are the side lengths of the equilateral triangles in the Padovan spiral, shown below.

## Pentagonal Numbers

Pentagonal numbers are type of sequence called "figurate numbers," so-called because they can be interpreted as geometrical shapes. The most well-known figurate numbers are the triangular numbers and square numbers. The triangular number sequence is

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210,...

The successive differences between terms of the triangular number sequence are 2, 3, 4, 5, 6, 7,... aka the positive integers starting with 2. The square number sequence is

1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361,...

The differences between successive terms of the square number sequence are 3, 5, 7, 9, 11, 13,... aka the odd numbers starting with 3. The picture below shows a geometric interpretation of the triangular and square numbers.

The pentagonal number sequence is

1, 5, 12, 22, 35, 51, 70, 92, 117, 145, 176, 210, 247, 287, 330, 376, 425, 477, 532, 590, 651, 715, 782, 852, 925, 1001, 1080, 1162, 1247, 1335, 1426, 1520, 1617, 1717, 1820, 1926, 2035, 2147, 2262, 2380, 2501, 2625, 2752, 2882,...

The differences between successive terms are 4, 7, 10, 13, 16, 19, 22,... aka numbers that are one more than a multiple of three. As the name suggests, they can be geometrically interpreted as dots on pentagons of increasing size.

Pentagonal numbers are rich in amazing mathematical properties.

- If E(n) is the nth pentagonal number, then E(n) = (3n^2 - n)/2. In other words, you can compute the nth pentagonal number directly without having to work out all the previous terms.
- The last digits of the pentagonal numbers form a repeating pattern with a cycle length of 20. The pattern is 1, 5, 2, 2, 5, 1, 0, 2, 7, 5, 6, 0, 7, 7, 0, 6, 5, 7, 2, 0. No pentagonal number ever ends in a 3, 4, 8, or 9.
- If you multiply a pentagonal number by 3, you will always get a triangular number. For example, 35*3 = 105.
- Multiply a pentagonal number by 5, add the previous pentagonal number, and subtract 1. The number you get will always a square number. For example, 51*5 + 35 - 1 = 289.
- There are infinitely many pentagonal numbers that are also square numbers.
- There are infinitely many pentagonal numbers that are also triangular numbers.
- Almost every positive integer can be expressed as the sum of at most four pentagonal numbers (not necessarily distinct). The only integers that require five pentagonal numbers are 9, 21, 31, 43, 55, and 89.
- The infinite sum of the reciprocals of the pentagonal numbers converges to 3*ln(3) - π/sqrt(3), approximately 1.4820375.

## 4, 16, 37, 58, 89, 145, 42, 20

The pattern "4, 16, 37, 58, 89, 145, 42, 20" doesn't have a special name, but it does have a special property. Starting with any number in this sequence, square each digit of the number, and then add up those squares. What you get is the next number in the sequence:

- 37 → 3^2 + 7^2 = 58
- 58 → 5^2 + 8^2 = 89
- 89 → 8^2 + 9^2 = 145
- 145 → 1^2 + 4^2 + 5^2 = 42
- 42 → 4^2 + 2^2 = 20
- 20 → 2^2 + 0^2 = 4
- 4 → 4^2 = 16
- 16 → 1^2 + 6^2 = 37.

In other words, these eight numbers form a cycle in the square-the-digits-and-add algorithm. What if you apply the square-the-digits-and-add algorithm to a different starting number, say 29,547? In this case you get

- 29,547 → 2^2 + 9^2 + 5^2 + 4^2 + 7^2 = 175
- 175 → 1^2 + 7^2 + 5^2 = 75
- 75 → 7^2 + 5^2 = 74
- 74 → 7^2 + 4^2 = 65
- 65 → 6^2 + 5^2 = 61
- 61 → 6^2 + 1^2 = 37

With a starting value of 29,547 we eventually hit upon one of the eight magic numbers, 37, which means if you continue the process you will cycle over the eight magic numbers forever.

But what if you start with a value of 29,548 instead? Running the procedure with this number gives you

- 29,548 → 2^2 + 9^2 + 5^2 + 4^2 + 8^2 = 190
- 190 → 1^2 + 9^2 + 0^2 = 82
- 82 → 8^2 + 2^2 = 68
- 68 → 6^2 + 8^2 = 100
- 100 → 1^2 + 0^2 + 0^2 = 1
- 1 → 1^2 = 1
- 1 → 1^2 = 1

This time the algorithm lands on 1, and will continue on as 1s forever. So far we have seen that when we run the square-the-digits-and-add procedure we either land on a cycle of eight numbers or just the single number 1. Are there any other possible outcomes? Can the algorithm stabilize on a different cycle or single number? Are there any starting values where the algorithm never stabilizes?

It turns out the answers to all these questions is no. That is, the square-the-digits-and-add procedure either stabilizes on the eight-number cycle or on the number 1. Starting values that stabilize at a value of 1 *do* have a special name. They are called "happy numbers." And starting values that stabilize on the eight-number cycle are called "unhappy numbers."

Happy and unhappy numbers have been studied extensively. For example, it is well-known that there are infinitely many types of both. It is also known that most integers are unhappy. Unfortunately, there is no simple formula that determines if a number is happy or unhappy other than applying the algorithm. Fortunately, the algorithm is fast. For instance, if you start with a number 100 digits long and compute the sum of its squared digits, the next number will be at most four digits long.

## Comments

Very interesting hub. Never heard of these number sequences. Are there any practical uses for these sequences?

What is this sequence called, it's in my math book:

1, 1, 1, 3, 5, 9, 17, 31, 57, 105, 193,...

How do you get the next number?

i am studying fibonacci/lucas type series such as

3, 1, 4, 5, 9, 14, 23, 37, 60, and

3, 2, 5, 7, 12, 19, 31, 50, 81

where i use different initial conditions from the standard 1 and 1. i would like to know if any of these have special names as the lucas series does.

5