A030347 Length of n-th run of digit 1 in A030341.
1, 3, 1, 1, 2, 1, 1, 5, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 3, 2, 2, 7, 3, 3, 2, 2, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 4, 1, 2, 1
Offset: 1
Programs
-
Mathematica
Length/@Select[Split[Flatten[Table[Reverse[IntegerDigits[n,3]],{n,0,100}]]],First[#]==1&] (* Harvey P. Dale, Oct 20 2014 *)