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.

A175911 Concatenate the run lengths of the runs of ones and zeros in the binary representation of n in the lowest possible base where it is possible to represent each run length as a single digit. Convert the result to base 10.

Original entry on oeis.org

1, 3, 2, 5, 7, 7, 3, 7, 16, 15, 14, 8, 22, 13, 4, 9, 29, 49, 17, 41, 31, 43, 23, 11, 25, 67, 23, 14, 53, 21, 5, 11, 46, 117, 30, 50, 148, 52, 27, 87, 124, 63, 122, 44, 130, 93, 34, 14, 45, 76, 26, 68, 202, 70, 39, 15, 57, 213, 54, 22, 106, 31, 6, 13, 67, 231, 47, 118, 469, 121
Offset: 1

Views

Author

Dylan Hamilton, Oct 14 2010

Keywords

Crossrefs

Programs

  • Haskell
    a175911 n = foldl1 (\v d -> b * v + d) rls where
       b = maximum rls + 1
       rls = a101211_row n
    -- Reinhard Zumkeller, Dec 16 2013
  • Mathematica
    repcount[x_] := Length/@Split[x]
    binrep[x_] := repcount[IntegerDigits[x, 2]]
    Table[h = binrep[x]; FromDigits[h, Max[h] + 1], {x, 1, DESIRED_NUMBER_OF_DIGITS}]
    f[n_] := Block[{a = Length /@ Split@ IntegerDigits[n, 2]}, FromDigits[a, Max@ a + 1]]; Array[f, 70] (* Robert G. Wilson v, Aug 17 2013 *)