representation in base "triangle"

Joshua Zucker joshua.zucker at gmail.com
Sat Sep 3 05:34:35 CEST 2005


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
> 1 = 1 = 1
> 10 = 2 = 2
> 11 = 21 = 3
> 20 = 22 = 4
> 110 = 32 = 5
> 111 = 321 = 6
> 120 = 322 = 7
> 210 = 332 = 8
> 1110 = 432 = 9
> 1111 = 4321 = 10
> 1120 = 4322 = 11
> 1210 = 4332 = 12
> 2110 = 4432 = 13
> 11110 = 5432 = 14
> 11111 = 54321 = 15

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].

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.

In my representation, if n is triangular then write 111...1.
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.

I kinda like the "place value" of my representation, though Andrew's 
algorithm is a fun way to obtain his representation.

Oh, and should the offset be 1, or should we insert a 0 at the beginning?

--Joshua Zucker

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! 
1
2
21
22
32
321
322
332
432
4321
4322
4332
4432
5432
54321
54322
54332
54432
55432
65432
654321
654322
654332
654432
655432
665432
765432
7654321
7654322
7654332
7654432
7655432
7665432
7765432
8765432
87654321
87654322
87654332
87654432
87655432
87665432
87765432
88765432
98765432
987654321
987654322
987654332
987654432
987655432
987665432
987765432
988765432
998765432
(in the subsequent two terms, the first "digit" is 10)
1098765432
10987654321

and terms for my notation for the same sequence:
1
10
11
20
110
111
120
210
1110
1111
1120
1210
2110
11110
11111
11120
11210
12110
21110
111110
111111
111120
111210
112110
121110
211110
1111110
1111111
1111120
1111210
1112110
1121110
1211110
2111110
11111110
11111111
11111120
11111210
11112110
11121110
11211110
12111110
21111110
111111110
111111111
111111120
111111210
111112110
111121110
111211110
112111110
121111110
211111110
1111111110
1111111111
1111111120
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.seqfan.eu/pipermail/seqfan/attachments/20050902/6141c768/attachment-0001.htm>


More information about the SeqFan mailing list