Mady has an infinite number of balls and empty boxes available to her. The empty boxes, each capable of holding four balls, are arranged in a row from left to right. At the first step, she places a ball in the first box of the row. At each subsequent step, she places a ball in the first box of the row that still has room for a ball and empties any previous boxes. How many balls in total are in the boxes as a result of Mady's 2010th step?
This would involve modular arithmetic but not sure how to solve it. Any idea appreciated. Thanks!
If I understand correctly, Mary is counting up in base 5. Example:
So I believe you should find the representation of 2010 in base 5 and add the digits together, e.g. $(2010)_{10} = (31020)_5$ so my answer would be 6 balls.