Here is the answer
Pirate #5 should propose the following distribution for (5,4,3,2,1):
997,0,1,0,2
Let us look at this problem in reverse order:
1. If there is only one pirate left, then he gets all the gold.
2. If there are two pirates left, then pirate 4 has to offer all the gold...