A frog is at the bottom of a well. It is a 30 foot climb to get out. Each morning, the frog jumps 3 feet up the path out, but each night, as it sleeps, it slips back 2 feet down.
Thus, at the beginning of the first day, the frog has 30 feet to go, at the beginning of the second day it has 29 feet to go, and so on.
How many days does it take the frog to get out of the well?
It takes 28 days for the frog to get out (it gets out on the morning of the 28th day).
This is because on the beginning of the 28th day, the frog has 3 feet left to travel. Because the frog jumps 3 feet forward each morning, it will jump out of the well on this day.
You are on your way to visit your Grandma, who lives at the end of the valley. It's her anniversary, and you want to give her the cakes you've made. Between your house and her house, you have to cross 5 bridges, and as it goes in the land of make believe, there is a troll under every bridge! Each troll, quite rightly, insists that you pay a troll toll. Before you can cross their bridge, you have to give them half of the cakes you are carrying, but as they are kind trolls, they each give you back a single cake.
How many cakes do you have to leave home with to make sure that you arrive at Grandma's with exactly 2 cakes?
At each bridge you are required to give half of your cakes, and you receive one back. Which leaves you with 2 cakes after every bridge.