How many cousins do you have?

You have two parents, four grandparents, eight great grandparents, 16 great-great-grandparents, 32 great-great-great grandparents … the numbers tend to get a little blurry if you go much further, but the idea is very simple and very familiar. Most people know the parable of the Chinese philosopher who asks the Emperor for a simple reward, one grain of rice on the first square of the chess board, two on the second, four on the third, doubling with each square until there isn't enough rice in the world to pay him. (One supposes the Emperor then has the philosopher torn apart by wild dogs.) The same principle, and the same scale, operates with ancestors. Presuming a conservative three generations per century, around the year 1000 AD, 30 generations ago, you should have 1,073,741,824 ancestors, more than a billion. This is at least three times the entire population of the planet in 1000 AD. Where did they all go?

The answer is straightforward. The calculation assumes that none of the couples over those thirty generations was in any way related. If you marry your second cousin, your children will only have 14 great-great-grandparents, not 16, 28 great-great-greats, instead of 32, and so on. At a stroke, you will have removed more than 130 million of those notional ancestors a thousand years ago. Marry your third cousin and you lose almost 70 million putative forebears, and that still presumes that none of the intervening couples was related. If just one set of grandparents in that third-cousin marriage were also third cousins, another 4 million ancestors vanish.

In fact, the chances are that almost all of your ancestors were related to each other in some way. In the relatively settled rural societies that were home to a large majority of humanity until relatively recently, third or fourth cousin marriages were the norm, not the exception.

If you reverse the perspective, the results are just as peculiar. Pick any of your ancestors a thousand years ago. Obviously, he or she has had descendants in each of the intervening 30 generations, since you exist. If more than one child in each of those generations had children themselves, a very conservative assumption indeed, then you are only one of several hundred million descendants of that ancestor

Thinking about ancestors on this scale might seem trivial, but it has some interesting implications. The fact is that we're all a lot more related than we care to realize. It should be less of a surprise to a genealogist than to a geneticist that 95% of all Europeans share the genes of seven women who lived 45,000 years ago. Even those seven were probably second cousins. The experts who popped up after George Bush's election to point out that he is related to the Queen are less eager to point out that he is just as closely related to several million other Britons. In fact, he is also related to Saddam Hussein, though perhaps a little more distantly.

And the sixteen or so generations since Pope Alexander VI had six children (as the Catholic Encyclopaedia puts it -"A stern Nemesis pursued him till death in the shape of a strong parental affection for his children") means that a fair proportion of the population of Rome can probably claim him as an ancestor, something to think about as you walk down the street on your next Italian holiday.