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.

A356329 Binary Look and Say sequence (method B - initial term is 1).

Original entry on oeis.org

1, 11, 110, 11001, 11001011, 1100101101110, 11001011011100111101, 11001011011100111101011000111, 1100101101110011110101100011101110011111, 1100101101110011110101100011101110011111011110101101
Offset: 1

Views

Author

Szumi Xie, Sep 18 2022

Keywords

Comments

Method B = 'digit'-indication followed by 'frequency' in binary.
It is not true that every term is a prefix of the following term; the first counterexample is at the 15th term.
It appears that the lengths of the common prefixes between adjacent terms strictly increase.

Examples

			The term after 11001 is obtained by saying "1 twice (10 in binary), 0 twice (10) and 1 once (1)", giving 1 10 0 10 1 1.
		

Crossrefs

Programs

  • Haskell
    import Data.List (group)
    import Numeric (showBin)
    a356329 n = a356329_list !! (n - 1)
    a356329_list = read <$> iterate (concat . concatMap (\x -> [take 1 x, showBin (length x) ""]) . group) "1" :: [Integer]
    
  • Mathematica
    a[1]=1; a[n_] := a[n]=Block[{s = Split@ IntegerDigits@ a[n-1]}, FromDigits@ Flatten@ Transpose[{First /@ s, IntegerDigits[ Length /@ s, 2]}]]; Array[a, 10] (* Giovanni Resta, Oct 05 2022 *)
  • Python
    from itertools import accumulate, groupby, repeat
    def summarize(n, _): return int("".join(k+bin(len(list(g)))[2:] for k, g in groupby(str(n))))
    def aupto(terms): return list(accumulate(repeat(1, terms), summarize))
    print(aupto(11)) # Michael S. Branicky, Sep 18 2022