137. Nine Barrels. In how many ways can nine barrels be arranged in three tiers so that the numbers written on the barrels to the right of any barrel or below it are greater than the number written on the barrel itself?

![](https://cdn.mathpix.com/cropped/2024_05_21_56f37ca27ac3d928838dg-040.jpg?height=460&width=449&top_left_y=1983&top_left_x=812)
The first correct arrangement that comes to mind is one where the top row is 123, the next row is 456, and the bottom row is 789. In the figure, I provide a second arrangement. In how many ways can the barrels be arranged?
137. The barrels can be arranged in 42 different ways. The positions of barrels 1 and 9 always remain unchanged. Let's agree to place barrel 2 so that it ends up below barrel 1. Then, if barrel 3 is placed below barrel 2, we get five variants of barrel placement. If, however, barrel 3 is placed to the right of barrel 1, then in five variants, barrel 4 ends up below barrel 2, in five - barrel 5, in four - barrel 6, and in two - barrel 7. In total, we get 21 variants. But there is no need to place barrel 2 below barrel 1. It can just as well be placed to the right of barrel 1. This way, we get another 21 variants. Upon careful examination, this set of placements turns out to be not new: all variants transform into one of the first variants when mirrored and flipped "upside down". In the center, barrels 4, 5, or 6 are always placed.