Generalizing the Pirates splitting treasure problem I came across this problem on puzzling the other day which asks about five pirates splitting treasure in the following way:

The first pirate takes 100 gold coins and then 1/6 of the remaining
  coins The second pirate takes 200 gold coins and then 1/6 of the
  remaining coins The third pirate takes 300 gold coins and 1/6 of the
  remaining coins, etc
At the end, they all have the same amount of gold coins. How many
  pirates were there and how much did they each get?

It takes only a little bit of algebra to solve this, there are 5 pirates and 2500 gold coins total, they each got 500 gold coins. 
I started playing around with the numbers then, what if they took 1/5 of the remaining coins instead, how does the problem change? It turns out, that sharing strategy would work with 4 pirates and 1600 gold coins. 
Is the total number of coins always going to be equal to the number of pirates squared times the initial number of coins the pirates each take? 
So, if I just looked at a problem of this type and it said the first pirate takes 10 coins and 1/7 of the remaining coins, and the next takes 20 and 1/7 of the remaining coins, does that mean there are 6 pirates and 360 coins total? Why does this pattern work? 
 A: Let's say the number of pirates is $k$, the initial number of coins taken is $m$ (before the extra fraction), and there are $k^2m$ coins. Then the first pirate takes $m+\dfrac{k^2m-m}{k+1}$ coins. That fraction reduces, because $$\frac{k^2m-m}{k+1}=\frac{m(k^2-1)}{k+1}=m\frac{(k+1)(k-1)}{k+1}=m(k-1)$$
Thus, the first pirate's total is $m+m(k-1)=mk$, which is exactly $\frac1k$ of the total.
See if you can extend this line of thinking to the second pirate, and then to all of them. :)
A: Okay, I think I get it. So, following from what G Tony Jacobs said, we know the first pirate got $mk$ coins, and the $i$th pirate should then get
$$im + \frac{k^2m - im - (CoinsGiven To All Previous Pirates)}{k+1}$$
and if we assume all previous pirates got the same amount the first pirate got, $mk$, we then know the $i$th pirate gets
$$im + \frac{k^2m - im - (i-1)mk}{k+1}$$
which simplifies down to $mk$ like this
$$im + \frac{m(k^2 -(i-1)k - i)}{k+1}=im+\frac{m(k-i)(k+1)}{k+1}=im + m(k-i) = im + mk -im=mk$$
