A diagram I like with the Hanoi puzzle (for 4 disks): pile_0 pile_+ pile_- moved summary direction disk of move 0: 1111 .... .... .... 0 0 0 0 1: 111. .... ...1 ...1 0 0 0 - 1 2: 11.. ..1. ...1 ..1. 0 0 + - 0 3: 11.. ..11 .... ...1 0 0 + + 1 4: 1... ..11 .1.. .1.. 0 - + + 1 5: 1..1 ..1. .1.. ...1 0 - + 0 1 6: 1..1 .... .11. ..1. 0 - - 0 0 7: 1... .... .111 ...1 0 - - - 1 8: .... 1... .111 1... + - - - 0 9: .... 1..1 .11. ...1 + - - + 1 10: ..1. 1..1 .1.. ..1. + - 0 + 0 11: ..11 1... .1.. ...1 + - 0 0 1 12: ..11 11.. .... .1.. + + 0 0 1 13: ..1. 11.. ...1 ...1 + + 0 - 1 14: .... 111. ...1 ..1. + + + - 0 15: .... 1111 .... ...1 + + + + 1 The rightmost column corresponds to the direction of the move made, it is the period-doubling sequence. Left from it the base-3 representation, Not all base-3 words occur. One more left the ruler function (aka bit changed with binary Gray code), telling which disk to move. The _untouched_ pile with the n-th move is (+-)n mod 3, the sign being + if n even, else - About threads with math-fun: I wondered why the threads are broken so often, here is why: The list sets a Reply-to to firstly the real sender, then to the list. Now a reasonable mailer will set the In-Reply-To to the message ID of the real sender (see the header of this mail). FIX: set the Reply-to to _firstly_ math-fun, then to the person that sent the mail! Note if you mailer uses the heuristic to put messages with same subject into the same thread you may not be observing the phenomenon. P.S.: Another bad: people using the reply function to start another thread. Please don't!