I could not wait a moment longer.
Let initially there be ?'x' coconuts in the pile.
Now, we proceed step by step as follows:
Number of coconuts before the First division = x
Number of coconuts removed in the First division = [{(x - 1)/5} + 1]
Remaining number of coconuts after the First division = [4(x - 1)/5] = A
Number of coconuts before the Second division = A
Number of coconuts removed in the Second division = [{(A - 1)/5} + 1]
Remaining number of coconuts after the Second division=[4(A - 1)/5] = B
Number of coconuts before the Third division = B
Number of coconuts removed in the Third division = [{(B - 1)/5} + 1]
Remaining number of coconuts after the Third division = [4(B - 1)/5] = C
Number of coconuts before the Fourth division = C
Number of coconuts removed in the Fourth division = [{(C - 1)/5} + 1]
Remaining number of coconuts after the Fourth division=[4(C - 1)/5] = D
Number of coconuts before the Fifth division = D
Number of coconuts removed in the Fifth division = [{(D - 1)/5} + 1]
Remaining number of coconuts after the Fifth division = [4(D - 1)/5] = E
Now, for the first part of the problem, the number of coconuts remaining (after the fifth man finished dealing with the pile) is one more than a multiple of 5, i.e., (a) 5y + 1 (say) whereas for the second part, i.e., (b) the number of coconuts remaining is an exact multiple of 5, i.e., 5y (say) where ?'y' is the number of coconuts each man receives in the final division.
On simplification (getting the final expression in terms of x and y), we get for the two questions (the two parts of the problem) the following equations:
1024x - 15625y = 11529 for (a) and
1024x - 15625y = 8404 for (b).
From these equations, we obtain: x (minimum) = 15621 for (a) and
x (minimum) = 3121 for (b).
Thus the number of coconuts left after each of the men finished dealing with the pile are:
15621, 12496, 9996, 7996, 6396, 5116 for (a) and
3121, 2496, 1996, 1596, 1276, 1020 for (b).
However I am still thinking about the ?'Rubber Band' problem.