Problem

Source: Israel Autumn 2016 TST1/2

Tags: number theory, number theory solved



Rothschild the benefactor has a certain number of coins. A man comes, and Rothschild wants to share his coins with him. If he has an even number of coins, he gives half of them to the man and goes away. If he has an odd number of coins, he donates one coin to charity so he can have an even number of coins, but meanwhile another man comes. So now he has to share his coins with two other people. If it is possible to do so evenly, he does so and goes away. Otherwise, he again donates a few coins to charity (no more than 3). Meanwhile, yet another man comes. This goes on until Rothschild is able to divide his coins evenly or until he runs out of money. Does there exist a natural number $N$ such that if Rothschild has at least $N$ coins in the beginning, he will end with at least one coin?