You can use rods of integer sizes to build "trains" that all share a common length. A
"train of length 5" is a row of rods whose combined length is 5. Here are some
examples:
Notice that the 1-2-2 train and the 2-1-2 train contain the same rods but are
listed separately. If you use identical rods in a different order, this is a separate
train.
- How many trains of length 5 are there?
- Come up with a formula for the number of trains of length n. (Assume you
have rods of every possible integer length available.) Prove that your formula
is correct.
- Come up with an algorithm that will generate all the trains of length
n.

You can use Trains as a warm up for
The Simplex Lock.