Final answer:
Working backward from the fourth man's share, we can calculate that the men gathered 41 pineapples originally. They each took 1/3 of the pineapples in turn, resulting in 6 remaining after all had eaten.
Step-by-step explanation:
Calculating the Number of Pineapples
Let's solve the problem by working backward to find out the original number of pineapples the men had gathered. When the fourth man ate his share, 6 pineapples were left. These 6 pineapples represent 1/3 of the pineapples left after the third man ate his share, because if he ate 1/3, 2/3 would remain. Thus, before the third man ate, there would be 6 × 3 = 18 pineapples.
Repeating this process, we know the second man also ate 1/3, leaving 2/3 of the pineapples before he ate. So before the second man ate, there would be 18 × 3/2 = 27 pineapples. Using the same logic, we find that before the first man ate his 1/3 share, the total number of pineapples would be 27 × 3/2 = 40.5. Since we cannot have half a pineapple in this context, we round up to 41. Therefore, the men initially gathered 41 pineapples.