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

%I #7 Dec 05 2013 19:55:58

%S 1,212,132323,1234243434,123234535454545,123234345464656565656,

%T 1232343454545657576767676767,123234345454565656767868687878787878,

%U 123234345454565656767676787897979898989898989

%N Smallest number having k digits "k" (k=1,...,n) but any two adjacent digits are different.

%C How many such numbers can be formed?

%C 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)

%C 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)

%C 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)

%F 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)

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

%K base,nonn

%O 1,2

%A _Amarnath Murthy_, Feb 05 2003

%E Corrected and extended by _M. F. Hasler_, Jun 22 2007

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)