# Sequences and PatternsSpecial Sequences

In addition to

## Prime Numbers

One example that you’ve already seen before are the **Prime numbers***prime* if it has no

Here are the first few prime numbers:

*2*, *3*, *5*, *7*, *11*, ,

*,*

*, …*

Unfortunately, prime numbers don’t follow a simple pattern or recursive formula. Sometimes they appear directly next to each other (these are called

Prime numbers also don’t have a simple geometric representation like

You can learn more about these and other properties of prime numbers in our course on Divisibility and Primes. They are some of the most important and most mysterious concepts in mathematics!

## Perfect Numbers

To determine if a number is *multiply* these factors to get back the original number, but let’s see what happens if we *add up* all factors of a number:

Number | Factors | Sum of Factors |

5 | 1 | 1 |

6 | 1 2 3 | 6 |

7 | 1 | 1 |

8 | 1 2 4 | 7 |

9 | 1 3 | 4 |

10 | 1 2 5 | |

11 | 1 | |

12 | 1 2 3 4 6 | |

13 | 1 | |

14 | 1 2 7 | |

15 | 1 3 5 | |

16 | 1 2 4 8 | |

17 | 1 | |

18 | 1 2 3 6 9 |

Let’s compare these numbers with their sum of factors:

For most numbers, the sum of its factors is **deficient numbers**.

For a few numbers, the sum of its factors is greater than itself. These numbers are called **abundant numbers**.

Only one number in the list above has a sum of factors that is *equal* to itself: **perfect number**

The next perfect number is 28, because if we add up all its factors we get

*6*, *28*, *496*, *8,128*, *33,550,336*, *8,589,869,056*, *137,438,691,328*, *2,305,843,008,139,952,128*, …

Notice that all of these numbers are

Perfect numbers were first studied by ancient Greek mathematicians like *odd* ones.

Today, mathematicians have used computers to check the first 10^{1500} numbers (that’s a 1 followed by 1500 zeros), but without success: all perfect numbers they found were even. To this day, it is still unknown whether there are any odd perfect numbers, making it the oldest unsolved problem in *all of mathematics*!

## The Hailstone Sequence

Most of the sequences we have seen so far had a single rule or pattern. But there is no reason why we can’t combine multiple different ones – for example a recursive formula like this:

If | |

If |

Let’s start with

*5*, *×3 +1*,

*,* ÷2

*,* ÷2

*,* ÷2

*,* ÷2

*,* ×3 +1

*,* ÷2

*, …* ÷2

It looks like after a few terms, the sequence reaches a “cycle”: 4, 2, 1 will continue to repeat over and over again, forever.

Of course, we could have picked a different starting point, like

${hailstones(n)}, *4*, *2*, *1*, *4*, *2*, *1*, *4*, *2*, *1*, …

It seems like the length of the sequence varies a lot, but it will always end up in a 4, 2, 1 cycle – no matter what first number we pick. We can even visualise the terms of the sequence in a chart:

Notice how some starting points end very quickly, while others (like 31 or 47) take more than one hundreds steps before they reach the 4, 2, 1 cycle.

All sequences that follow this recursive formula are called **Hailstone Sequences**

In 1937, the mathematician *every* hailstone sequence eventually ends in a 4, 2, 1 cycle – whatever starting value you pick. You’ve already checked a few starting points above, and computers have actually tried all numbers up to

However, there are infinitely many integers. It is impossible to check each of them, and no one has been able to find a

Just like the search for odd perfect numbers, this is still an open problem in mathematics. It is amazing that these simple patterns for sequences can lead to questions that have mystified even the best mathematicians in the world for centuries!

## The Look-and-Say Sequence

Here is one more sequence that is a bit different from all the ones you’ve seen above. Can you find the pattern?

1, 11, *21*, *1211*, *111221*, *312211*, …

This sequence is called the **Look-and-Say** sequence, and the pattern is just what the name says: you start with a 1, and every following term is what you get if you “read out loud” the previous one. Here is an example:

Can you now find the next terms?

…, *312211*, ,

*, …*

This sequence is often used as a puzzle to trip up mathematicians – because the pattern appears to be completely non-mathematical. However, as it turns out, the sequence has many interesting properties. For example, every term ends in

The British mathematician *Cosmological Theorem*, and named the different sections using the chemical elements *Hydrogen*, *Helium*, *Lithium*, …, up to *Plutonium*.

## The Sequence Quiz

You’ve now seen countless different mathematical sequences – some based on geometric shapes, some that follow specific formulas, and others that seem to behave almost randomly.

In this quiz you can combine all your knowledge about sequences. There is just one goal: find the pattern and calculate the next two terms!

### Find the next number

7, 11, *15*, *19*, *23*, *27*, ,

*, … Pattern: Always +4*

11, 14, *18*, *23*, *29*, *36*, ,

*, … Pattern: +3, +4, +5, +6, …*

3, 7, *6*, *10*, *9*, *13*, ,

*, … Pattern: +4, –1, +4, –1, …*

2, 4, *6*, *12*, *14*, *28*, ,

*, … Pattern: ×2, +2, ×2, +2, …*

1, 1, *2*, *3*, *5*, *8*, ,

*, … Pattern: Fibonacci Numbers*

27, 28, *30*, *15*, *16*, *18*, ,

*, … Pattern: +1, +2, ÷2, +1, +2, ÷2, …*

1, 9, *25*, *49*, *81*, *121*, ,

*, … Pattern: Odd square numbers*