representation in base "triangle"

Andrew Plewe aplewe at sbcglobal.net
Sat Sep 3 10:24:32 CEST 2005


Yes, one of the ways in which this diverges from a normal "base" 
representation is that the number of digits in the "base" is actually 
infinitely large -- if you're dealing with the 123rd triangle number 
you'll have a number of "digits" that are three digits in size.  Not 
exactly consistent with the general idea of a "base".  Nevertheless, 
you are guaranteed that every integer has a unique representation.  
Also, some representations have nice properties.  Consider, for 
instance, 654322 (or 22).  This number is very easily factorable in 
this base, realizing that the last three digits summed together is one 
greater than the first, giving 7654, which means that this value (22) 
shares a divisor with 4.  If you look exactly three terms further, 
you'll find 655432.  Removing one 5 and adding it to two gives 76543 
(25), which shares a divisor with 5.  Not the best factoring method 
ever, but it's indicative of some of the other properties you may 
encounter with numbers written in this format.  I like your notation, 
though, mostly because it sticks closer to the idea of a "base" than 
mine does.  Finally, I think adding a 0 at the beginning is fine, since 
it follows the rules I used to define the sequence.

	-Andrew Plewe-

On Sep 2, 2005, at 8:34 PM, Joshua Zucker wrote:

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







More information about the SeqFan mailing list