There are $x>0$ coins in a pile and $5$ people who take from the pile according to the following rule: The first person takes $20$% of coins, the second takes $20$% of the remaining coins, the third takes $20$% of remaining coins, and so on. If there are any coins left after all the $5$ people take coins, the remaining coins are divided equally among the five people. Note that it's impossible to split coins.
What is the minimum value of $x$ so that everyone takes a coin without violating rules?
Someone may ask what's my attempt, but I wasn't able to solve this and asking for the correct solution.
After the fifth person takes a coin, there must be a nonzero remaining number of coins, since they only took 20% of the coins that were there and it is impossible to split coins. Since the remaining coins have to be split evenly among all 5 people, the remaining number of coins must be $5k$ for some positive whole number $k > 0$.
Now we work backwards. Since each person took 20% of the remainder, each person must have multiplied the amount of coins they started with by $4/5$. Therefore, we must multiply by $5/4$ at each turn:
So $k$ must be divisible by $1024$, and the smallest possible such value of $k$ is obviously $1024$. Therefore there were $15625(1024)/1024 = 15625$ coins originally. The full sequence goes:
At the end, the distribution of wealth is $$[3125, 2500, 2000, 1600, 1280] + [1024, 1024, 1024, 1024, 1024] = [4149, 3524, 3024, 2624, 2304],$$ where the number in position $i$ is the wealth of person $i$ for $i = 1$ through $5$.