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.
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
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
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 *)