A138711 n-th run has length n-th positive triangular number, with digits 0 and 1 only, starting with 1.
1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1
Examples
.n ..... Run ............................... Length .1 ..... 1 ................................. 1 .2 ..... 0,0,0 ............................. 3 .3 ..... 1,1,1,1,1,1........................ 6 .4 ..... 0,0,0,0,0,0,0,0,0,0 ............... 10 .5 ..... 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ..... 15
Programs
-
Mathematica
Flatten[Table[Join[PadRight[{},(n(n+1))/2,1],PadRight[{},((n+1)(n+2))/2, 0]],{n,1,7,2}]] (* Harvey P. Dale, Dec 11 2011 *)
Comments