A138149 n-th run has length n-th prime, with values 0 and 1 only, starting with 1.
1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 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
Offset: 1
Examples
.n ..... Run ....................... Length .1 ..... 1,1 ....................... 2 .2 ..... 0,0,0 ..................... 3 .3 ..... 1,1,1,1,1 ................. 5 .4 ..... 0,0,0,0,0,0,0 ............. 7 .5 ..... 1,1,1,1,1,1,1,1,1,1,1 ..... 11
Programs
-
Mathematica
Flatten[Table[{Table[1,{Prime[n]}],Table[0,{Prime[n+1]}]},{n,1,11,2}]] (* Harvey P. Dale, Jan 25 2013 *)