Four Gallons From a Five and a Three, and Why Coprimality Is the Trick
Adding fives and threes never reaches four, and that observation is correct. It is also about the wrong set, because a pour is a subtraction and the reachable amounts are the integer combinations rather than the natural ones. An exhaustive state-graph search proves six pours is minimal, and the four missing sums turn out to be the gaps of a numerical semigroup.