="Mike Stay" <metaweta@gmail.com> There is a way of writing natural numbers in "base n" that uses the digits 1..n instead of 0..(n-1). The reverse of such an expansion will always have the same length.
Nice! Adjoining the reversals to Mike's table:
0 0 1 1 1 1 2 2 2 2 3 11 11 3 4 12 21 5 5 21 12 4 6 22 22 6 7 111 111 7 8 112 211 B 9 121 121 9 A 122 221 D B 211 112 8 C 212 212 C D 221 122 A E 222 222 E
== 0,1,2,3,5,4,6,7,11,9,13,8,12,10,14,... 2nd column is A007931, last is A081241 (to which a(0)=0 might be added?) The name "logic-binary" is apparently used for this representation. Taking the 1 <--> 2 "complement" gives 0 0 1 1 2 2 2 2 1 1 3 11 22 6 4 12 21 5 5 21 12 4 6 22 11 3 7 111 222 E 8 112 221 D 9 121 212 C A 122 211 B B 211 122 A C 212 121 9 D 221 112 8 E 222 111 7 == 0,2,1,6,5,4,3,14,13,12,11,10,9,8,7,... == Not in the OEIS, but incrementing it gives A054429. Both complementing and reversing yields another self-inverse: 0 0 0 1 1 2 2 2 2 1 1 3 11 22 6 4 12 12 4 5 21 21 5 6 22 11 3 7 111 222 E 8 112 122 A 9 121 212 C A 122 112 8 B 211 221 D C 212 121 9 D 221 211 B E 222 111 7 == 0,2,1,6,4,5,3,14,10,12,8,13,9,11,7,... Also not in the OEIS, but similarly incrementing it gives A059894. I'm just shy of enough gumption right now to delve into AND, IOR and XOR--perhaps someone less marginal might... It's amusing to imagine a "hardware" logic-binary "sesqui-adder" component: +---+---+-----++---+------+ | X | Y | Cin || Z | Cout | +---+---+-----++---+------+ | 1 | 1 | || 2 | | +---+---+-----++---+------+ | 1 | 2 | || 1 | 1 | +---+---+-----++---+------+ | 2 | 1 | || 1 | 1 | +---+---+-----++---+------+ | 2 | 2 | || 2 | 1 | +---+---+-----++---+------+ | 1 | 1 | 1 || 1 | 1 | +---+---+-----++---+------+ | 1 | 2 | 1 || 2 | 1 | +---+---+-----++---+------+ | 2 | 1 | 1 || 2 | 1 | +---+---+-----++---+------+ | 2 | 2 | 1 || 1 | 2 | +---+---+-----++---+------+ | 1 | 1 | 2 || 2 | 1 | +---+---+-----++---+------+ | 1 | 2 | 2 || 1 | 2 | +---+---+-----++---+------+ | 2 | 1 | 2 || 1 | 2 | +---+---+-----++---+------+ | 2 | 2 | 2 || 2 | 2 | +---+---+-----++---+------+ Which I guess implies the obvious shift-and-add multiplier would work too.