I came across this little calculation recently and it might make a simple but interesting brainteaser.
ANCESTRAL MATHEMATICS
When you were born, your ancestral tree looked like this:
2 parents
4 grandparents
8 great-grandparents
16 second great-grandparents
32 third great-grandparents
64 fourth great-grandparents
128 fifth great-grandparents
256 sixth great-grandparents
512 seventh great-grandparents
1,024 eighth great-grandparents
2,048 ninth great-grandparents
So, looking back at the previous 11 generations, you will discover 4,094 direct ancestors in the last 400 years.
But that only dates back to the year 1620!
Build a little program that can take us back to the year 0 AD - what nth generation is that and how many ancestors have you had since then?
For a little more challenge, assume that a generation is 35 years. Build a calculator where you can plug in a year anywhere from 0 to the present and it will put that year into a 35-year bucket, tell you how many generations have existed since then, and calculate the number of ancestors you would have from that point in time.