This site is supported by donations to The OEIS Foundation.

 Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing. Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A258055 Concatenation of the decimal representations of the lengths (increased by 1) of the runs of zeros between successive ones in the binary representation of n. 2
 0, 0, 0, 1, 0, 2, 1, 11, 0, 3, 2, 21, 1, 12, 11, 111, 0, 4, 3, 31, 2, 22, 21, 211, 1, 13, 12, 121, 11, 112, 111, 1111, 0, 5, 4, 41, 3, 32, 31, 311, 2, 23, 22, 221, 21, 212, 211, 2111, 1, 14, 13, 131, 12, 122, 121, 1211, 11, 113, 112, 1121, 111, 1112, 1111 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,6 COMMENTS Originally called the "Golden Book's ZI-sequence" by the author. The ZI-sequence is related to the binary numbers sequence with 10 ^ n substituted by the respective exponent increased by 1 (i.e., 10 as 2, 100 as 3, etc.) and the least significant bit discarded, e.g., binary 1011 converts to ZI 21. a(n) = 0 when no successive ones exist in the binary representation of n, i.e., when n=0 and when n is a power of 2. - Giovanni Resta, Aug 31 2015 LINKS A. Strazds, The Golden Book EXAMPLE Example for n=6: binary 110 => split into 10^m components: 1 (10^0) and 10 (10^1) => 1; the least significant bit, and thus the whole last component, here 10, is discarded. 840 in binary is 1100101000. The runs of zeros between successive ones have length 0, 2 and 1, hence a(840) = 132. - Giovanni Resta, Aug 31 2015 MATHEMATICA a[0] = 0; a[n_] := FromDigits@ Flatten[ IntegerDigits /@ Most[ Length /@ (Split[ Flatten[ IntegerDigits[n, 2] /. 1 -> {1, 0}]][[2 ;; ;; 2]]) ]]; Table[a@ n, {n, 0, 100}] (* Giovanni Resta, Aug 31 2015 *) PROG (PHP) function dec2zi (\$d) { \$b = base_convert(\$d, 10, 2); \$b = str_split(\$b); \$i = \$z = 0; \$r = ""; foreach(\$b as \$v) { if (!\$v) { \$i++; } else { if (\$i > 0) { \$r .= \$i + \$v; \$i = 0; } else { if (\$z > 0) { \$r .= \$v; \$z = 0; } \$z++; }}} return \$r == "" ? 0 : \$r; } CROSSREFS Cf. A248646, A256494. See also A261300 for another version. Sequence in context: A271042 A098290 A160110 * A139393 A037916 A320390 Adjacent sequences:  A258052 A258053 A258054 * A258056 A258057 A258058 KEYWORD nonn,base,easy AUTHOR Armands Strazds, May 17 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 5 13:26 EST 2019. Contains 329751 sequences. (Running on oeis4.)