login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A279210
Length of second run of 1's in binary expansion of n.
3
0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 2, 0, 1, 0, 0, 0, 1, 1, 2, 1, 1, 2, 3, 0, 1, 1, 2, 0, 1, 0, 0, 0, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 1, 2, 2, 3, 4, 0, 1, 1, 2, 1, 1, 2, 3, 0, 1, 1, 2, 0, 1, 0, 0, 0, 1, 1, 2, 1, 1, 2, 3, 1, 1, 1, 1, 2, 2, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 5, 0, 1, 1, 2, 1
OFFSET
0,12
LINKS
FORMULA
a(2*n) = a(n). - David A. Corneth, Oct 12 2018
EXAMPLE
46 = 101110_2 so a(46) = 3.
MATHEMATICA
Table[First[Map[Length, Rest@ DeleteCases[#, w_ /; First@ w == 0] &@ Split@ IntegerDigits[n, 2]] /. {} -> {0}], {n, 100}] (* Michael De Vlieger, Dec 23 2016 *)
CROSSREFS
Sequence in context: A231189 A363857 A219558 * A232243 A034876 A091393
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, Dec 22 2016
EXTENSIONS
More terms from Michael De Vlieger, Dec 23 2016
STATUS
approved