The sequences of numbers you might have been playing with here all share one feature: every number in the sequence depends in some way on the number (or numbers) that come before it. The rule that describes just how a number depends on its predecessor(s) is called a *recurrence relation*.

Recurrence relations come up in many real life situations. Economists try to predict how the economy will fare in the future based on numbers that describe how it is doing today. Biologists try to find out how next year's population of animals, say Zebra in an African national park, depends on this year's population and the population of predators, such as lions. Researchers studying the spread of diseases, such as ebola, try to predict how many people will be infected in a month's time based on the number of people that are infected now.

One challenge in these examples is to find the equations that describe, or at least approximate, the way that one number depends on the previous one(s). But even if you have found a formula that seems to do the trick, strange things can happen. In order to predict how the size of an animal population will vary, for example, you start with the numbers that describe today's population and then calculate the corresponding numbers for next year, the year after, etc, using your recurrence relation. Imagine that you get today's values ever so slightly wrong â€“ after all, you might not be able to count all the Zebras in a large national park. You might think that this won't make a big difference: the prediction will be slightly wrong, but if the error is small to start with, it will remain small. But this isn't always true! Even the tiniest error can quickly snowball into a very large one that renders your predictions completely useless.

This is known as the *butterfly effect*: the air disturbance caused by the flap of a butterfly's wing in Texas can grow to cause a tornado in Brazil. Recurrence relations for which this can happen are called *chaotic*. This type of chaos is the reason why it's so hard to predict the weather, the stockmarket, and many other things people would love to be able to predict. As a famous physicist once said, "prediction is difficult, especially about the future."

(*You can read more in A fat chance of chaos and Did chaos cause mayhem in Jurassic Park?*)