cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A319953 List of binary words of lengths 0, 1, 2, etc., including empty word, each prefixed by a 2.

This page as a plain text file.
%I A319953 #19 Feb 20 2021 17:23:08
%S A319953 2,20,21,200,201,210,211,2000,2001,2010,2011,2100,2101,2110,2111,
%T A319953 20000,20001,20010,20011,20100,20101,20110,20111,21000,21001,21010,
%U A319953 21011,21100,21101,21110,21111,200000,200001,200010,200011,200100,200101,200110,200111
%N A319953 List of binary words of lengths 0, 1, 2, etc., including empty word, each prefixed by a 2.
%H A319953 Rémy Sigrist, <a href="/A319953/b319953.txt">Table of n, a(n) for n = 0..25000</a>
%H A319953 Carl Pomerance, John Michael Robson, and Jeffrey Shallit, <a href="https://doi.org/10.1016/S0304-3975(96)00189-2">Automaticity II: Descriptional complexity in the unary case</a>, Theoretical computer science 180.1-2 (1997): 181-201.
%F A319953 a(n) = A007088(n+1) + 10^A000523(n+1). - _Rémy Sigrist_, Oct 04 2018
%o A319953 (PARI) a(n) = my (b=binary(n+1)); b[1]++; fromdigits(b) \\ _Rémy Sigrist_, Oct 04 2018
%o A319953 (Python)
%o A319953 def a(n): return int(bin(n)[2:].replace('1', '2', 1))
%o A319953 print([a(n) for n in range(1, 40)]) # _Michael S. Branicky_, Feb 20 2021
%Y A319953 Cf. A000523, A007088, A214339, A319954.
%K A319953 nonn,base
%O A319953 0,1
%A A319953 _N. J. A. Sloane_, Oct 04 2018
%E A319953 Data corrected and extended by _Rémy Sigrist_, Oct 04 2018