Branch Manager

A puzzle from The Book of the Thousand Nights and One Night:

“Solve the following problem if you can: a flock of pigeons alighted upon a tree, some perching upon the upper branches and some upon the lower; those upon the upper branches said to those upon the lower: ‘If one of you flies up to us our number will be double yours; if one of us flies down to you, our numbers will be equal.'”

How large was the flock?

Click for Answer