The integer-sized rods would consist of 1, 2, 3, 4 and 5. To build a train of length 5 you could use 1 rod; two rods of lengths 1 and 4, 2 and 3; three rods of lengths (1, 1 and 3) and (1, 2 and 2); four rods of 1, 1, 1 and 2; and five rods of lengths 1, 1, 1, 1 and 1. If you count, for example, 1 and 4 as being different from 4 and 1, then there would be 4 ways of using two rods; six ways of using three rods; four ways of using four rods; and, of course, one way of using five rods or one rod. This pattern 1 4 6 4 1 is a row of Pascal's triangle and is related to n, where n is the length of the train. When we add these numbers together we get 16, which is 2^4. For a train of length n, my guess is that the total number of ways of setting up the rods is 2^(n-1).