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.

A233836 Run lengths of ones and zeros in binary expansion of sqrt(2), cf. A004539.

Original entry on oeis.org

1, 1, 2, 1, 1, 1, 1, 5, 1, 2, 4, 2, 2, 2, 2, 2, 7, 2, 3, 1, 4, 2, 2, 2, 1, 2, 1, 4, 1, 3, 1, 1, 2, 2, 1, 1, 5, 1, 2, 3, 1, 2, 2, 1, 2, 2, 2, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 5, 1, 1, 2, 5, 3, 3, 1, 1, 1, 2, 1, 4, 1, 2, 5, 1, 1, 3, 1, 1, 1, 1, 3
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 16 2013

Keywords

Examples

			. A004539: 1 0 1 1 0 1 0 1 0 0 0 0 0 1 0 0 1 1 1 1 0 0 1 1 0 0 1 1 ...
.    runs: _ _ ___ _ _ _ _ _________ _ ___ _______ ___ ___ ___ ___ ...
. lengths: 1 1  2  1 1 1 1     5     1  2     4     2   2   2   2  ...
		

Crossrefs

Programs

  • Haskell
    import Data.List (group)
    a233836 n = a233836_list !! (n-1)
    a233836_list = map length $ group a004539_list
  • Mathematica
    Length/@Split[RealDigits[Sqrt[2],2,300][[1]]] (* Harvey P. Dale, Oct 11 2020 *)