OFFSET

1,2

COMMENTS

How many such numbers can be formed?

The first (n-1)(n-2)/2 digits of a(n) (part (1) of the formula) remain the same for all subsequent terms. (M. F. Hasler, Jun 22 2007)

Terms of the sequence do not really depend on the base: for any base b>n, terms a(1)..a(n) would read the same. Thus one could add "(in base n+1)" to the definition and delete the keyword "base". (M. F. Hasler, Jun 22 2007)

The sequence could be extended to terms n>9 in two ways: (1) by writing a(n) according to the prescription in base n+1, but recording the corresponding value in base 10; (2) by providing a convention for encoding digits d > 9, e.g. by pre-pending them with '0#' (knowing they will never occur at the beginning of a(n)), where # is the number of characters used to write the digit (encoded recursively in the same way if #>9). (M. F. Hasler, Jun 22 2007)

FORMULA

To get a(n): (1) start with an empty string and always concatenate the smallest possible of the remaining digits, until there are 2n-1 digits left (n "n"s and n-1 other digits); (2) insert the n-1 other digits in-between the "n"s and concatenate this result to the first string. (M. F. Hasler, Jun 22 2007)

EXAMPLE

a(3) = 132323 using 1, 2,2 and 3,3,3 with no two adjacent numbers same.

CROSSREFS

KEYWORD

base,nonn

AUTHOR

Amarnath Murthy, Feb 05 2003

EXTENSIONS

Corrected and extended by M. F. Hasler, Jun 22 2007

STATUS

approved