This problem can be solved by working backwards. In the following I shall assume that pirates are indifferent to the fate of others and will vote randomly between options with equal benefit to themselves.
A. If there are 2 pirates left, then pirate 2 can force his proposal to be accepted, so he'll get all the loot. Needless to say pirate 2 wants this to happen and the others don't.
B. If there are 3 pirates left, pirate 1 will vote for pirate 3 (because of A.) if pirate 3 offers him even 1 gold coin. pirate 2 will vote against unless he is given all the coins. So pirate 3's proposal would be 99 for himself and 1 for pirate 1., and it would be accepted.
C. If there are 4 pirates left, pirate 2 will vote for pirate 4 if he is offered anything (because of B.), pirate 3 will vote against unless he is given 99 or more, and pirate 1 will vote for if he's given at least 2 coins. So pirate 4's proposal would be 99 for himself and 1 for pirate 2, and this would also be accepted because 2 and 4 would vote for it.
D. Now we come to the captain's proposal, the one which actually happens. Here are the number of coins he needs to give people to ensure they vote for him (given C.): pirate 1 wants 1 coin, 2 wants 2, 3 wants 1 and 4 wants 100. So the pirate captain proposes 98 for himself, 1 to pirate 1 and 1 to pirate 3. Pirates 1,3 and 5 vote in favour so the captain is successful.
End result? The captain survives, and gets to keep 98 of the 100 gold coins for himself! If pirates had the ability to promise things to each other and stick to their promises, of course, the other pirates would have been able to secure a much larger share of the loot.
Here's a similar problem, only with lawyers instead of pirates:
After a particularly successful court case in which the losing party is financially ruined, a partnership of 5 lawyers comes into possession of 100 valuable antiques (all of equal value). The lawyers operate a similar scheme to the pirates, except that if a proposal is rejected the proposer just gets expelled from the partnership, since murder is against the law, though explusion is still undesirable. Lawyers mostly behave like pirates, but with one important difference: they can sign contracts, and once a lawyer has signed a contract he will never renege on it, nor will he sign other contracts which contradict it. For simplicity's sake, we'll say that all contracts are known by all five lawyers, and that they are of the following form:
"This contract comes into force if Party A must make a proposal.
Party A agrees to give Party B at least X of the antiques in his proposal.
Party B agrees to vote for Party A's proposal."
So: how do the lawyers divide up their profits?