This article is from the Puzzles FAQ, by Chris Cole firstname.lastname@example.org and Matthew Daly email@example.com with numerous contributions by others.
A circle with radius 1 rolls without slipping once around a circle with radius
3. How many revolutions does the smaller circle make?
4 if the smaller circle rolls on the outside of the larger circle; 2 if
it rolls on the inside.
Imagine you are rolling a wheel by pushing it along the equator of the
earth. Suppose the circumference of the wheel is one third of that of
the earth. By the time you return to your starting point, the wheel
finishes 3 revolutions relative to you. But do not forget you yourself
also finishes 1 revolution in the same direction. As a result, the
number of absolute revolutions is 3+1=4.
But if the small circle is rolling inside the large circle, the answer
is then 3-1=2, because in this case the wheel makes a counter-revolution
as you walk once around.