The basic pattern is that it's like trinary, but once you get to something ending in some 1s and finally a 2, the two starts to migrate upward, leaving 0s behind it (as in 10112, 10120, 10200, 11000) until the 2 disappears and you keep on going normally. The effect is that instead of digits flipping over all at once, as in 999998, 999999, 1000000, it happens one at a time. Very interesting number system.