A233836 Run lengths of ones and zeros in binary expansion of sqrt(2), cf. A004539.
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
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 ...
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
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 *)