login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A079794 Smallest number having k digits "k" (k=1,...,n) but any two adjacent digits are different. 0
1, 212, 132323, 1234243434, 123234535454545, 123234345464656565656, 1232343454545657576767676767, 123234345454565656767868687878787878, 123234345454565656767676787897979898989898989 (list; graph; refs; listen; history; text; internal format)
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)

LINKS

Table of n, a(n) for n=1..9.

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: A210257 A239045 A262657 * A197106 A138568 A201104

Adjacent sequences:  A079791 A079792 A079793 * A079795 A079796 A079797

KEYWORD

base,nonn

AUTHOR

Amarnath Murthy, Feb 05 2003

EXTENSIONS

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

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 16 19:48 EST 2022. Contains 350376 sequences. (Running on oeis4.)