Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A079794
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A079794 Smallest number having k digits "k" (k=1,...,n) but any two adjacent digits are different. +0
1
1, 212, 132323, 1234243434, 123234535454545, 123234345464656565656, 1232343454545657576767676767, 123234345454565656767868687878787878, 123234345454565656767676787897979898989898989 (list; graph; listen)
OFFSET

1,2

COMMENT

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

Sequence in context: A082828 A083962 A007942 this_sequence A138568 A092126 A085309

Adjacent sequences: A079791 A079792 A079793 this_sequence A079795 A079796 A079797

KEYWORD

base,nonn

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Feb 05 2003

EXTENSIONS

Corrected and extended by M. F. Hasler (maximilian.hasler(AT)gmail.com), Jun 22 2007

page 1

Search completed in 0.045 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research