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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Other ways to Give
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A319953 List of binary words of lengths 0, 1, 2, etc., including empty word, each prefixed by a 2. 3
2, 20, 21, 200, 201, 210, 211, 2000, 2001, 2010, 2011, 2100, 2101, 2110, 2111, 20000, 20001, 20010, 20011, 20100, 20101, 20110, 20111, 21000, 21001, 21010, 21011, 21100, 21101, 21110, 21111, 200000, 200001, 200010, 200011, 200100, 200101, 200110, 200111 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
Carl Pomerance, John Michael Robson, and Jeffrey Shallit, Automaticity II: Descriptional complexity in the unary case, Theoretical computer science 180.1-2 (1997): 181-201.
FORMULA
a(n) = A007088(n+1) + 10^A000523(n+1). - Rémy Sigrist, Oct 04 2018
PROG
(PARI) a(n) = my (b=binary(n+1)); b[1]++; fromdigits(b) \\ Rémy Sigrist, Oct 04 2018
(Python)
def a(n): return int(bin(n)[2:].replace('1', '2', 1))
print([a(n) for n in range(1, 40)]) # Michael S. Branicky, Feb 20 2021
CROSSREFS
Sequence in context: A072998 A024629 A235500 * A111193 A136906 A260570
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Oct 04 2018
EXTENSIONS
Data corrected and extended by Rémy Sigrist, Oct 04 2018
STATUS
approved

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 December 5 05:37 EST 2023. Contains 367575 sequences. (Running on oeis4.)