<span style="font-family: courier new,monospace;">Rewriting Andrew's
numbers instead with, say, 4332 re-coded as 1210, that is, using the
place-value to represent whether the digits are 1, 2, 3, or 4, I get</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">>     1 = 1      = 1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">>    10 = 2      = 2</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">>    11 = 21     = 3</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">>    20 = 22     = 4</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">>   110 = 32     = 5</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">>   111 = 321    = 6</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">>   120 = 322    = 7</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">>   210 = 332    = 8</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">>  1110 = 432    = 9</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">>  1111 = 4321   = 10</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">>  1120 = 4322   = 11</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">>  1210 = 4332   = 12</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">>  2110 = 4432   = 13</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">> 11110 = 5432   = 14</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">> 11111 = 54321  = 15</span><br style="font-family: courier new,monospace;">
<br>
In Andrew's representation, one way to determine it is to find t(n) as
the biggest triangular number less than n.  Then, write the digits
corresponding to t(n) [for instance, if t(n) is 10, write 4321].<br>
<br>
Then, take k = n - t(n), and add 1 to each of the last k digits that
you have.  For instance, if n is 13, write 4321 and add 1 to each
of the last three digits, 4432.<br>
<br>
In my representation, if n is triangular then write 111...1.<br>
Otherwise, with k defined as in the previous paragraph, write that same
string of 1s (corresponding to t(n)), replace the last digit with a 0,
and replace the k+1st digit from the right with a 2.<br>
<br>
I kinda like the "place value" of my representation, though Andrew's algorithm is a fun way to obtain his representation.<br>
<br>
Oh, and should the offset be 1, or should we insert a 0 at the beginning?<br>
<br>
--Joshua Zucker<br>
<br>
PS: more terms for Andrew's notation:  Hey, wait, it breaks down
at 54 or so, when you start wanting to write 10s in there!  <br>
 1<br>
 2<br>
 21<br>
 22<br>
 32<br>
 321<br>
 322<br>
 332<br>
 432<br>
 4321<br>
 4322<br>
 4332<br>
 4432<br>
 5432<br>
 54321<br>
 54322<br>
 54332<br>
 54432<br>
 55432<br>
 65432<br>
 654321<br>
 654322<br>
 654332<br>
 654432<br>
 655432<br>
 665432<br>
 765432<br>
 7654321<br>
 7654322<br>
 7654332<br>
 7654432<br>
 7655432<br>
 7665432<br>
 7765432<br>
 8765432<br>
 87654321<br>
 87654322<br>
 87654332<br>
 87654432<br>
 87655432<br>
 87665432<br>
 87765432<br>
 88765432<br>
 98765432<br>
 987654321<br>
 987654322<br>
 987654332<br>
 987654432<br>
 987655432<br>
 987665432<br>
 987765432<br>
 988765432<br>
 998765432<br>
(in the subsequent two terms, the first "digit" is 10)<br>
 1098765432<br>
 10987654321<br>
<br>
and terms for my notation for the same sequence:<br>
 1<br>
 10<br>
 11<br>
 20<br>
 110<br>
 111<br>
 120<br>
 210<br>
 1110<br>
 1111<br>
 1120<br>
 1210<br>
 2110<br>
 11110<br>
 11111<br>
 11120<br>
 11210<br>
 12110<br>
 21110<br>
 111110<br>
 111111<br>
 111120<br>
 111210<br>
 112110<br>
 121110<br>
 211110<br>
 1111110<br>
 1111111<br>
 1111120<br>
 1111210<br>
 1112110<br>
 1121110<br>
 1211110<br>
 2111110<br>
 11111110<br>
 11111111<br>
 11111120<br>
 11111210<br>
 11112110<br>
 11121110<br>
 11211110<br>
 12111110<br>
 21111110<br>
 111111110<br>
 111111111<br>
 111111120<br>
 111111210<br>
 111112110<br>
 111121110<br>
 111211110<br>
 112111110<br>
 121111110<br>
 211111110<br>
 1111111110<br>
 1111111111<br>
 1111111120<br style="font-family: courier new,monospace;">