A138150 n-th run has length n-th prime, with digits 0 and 1 only, starting with 0.
0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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 ..... 0,0 ....................... 2 .2 ..... 1,1,1 ..................... 3 .3 ..... 0,0,0,0,0 ................. 5 .4 ..... 1,1,1,1,1,1,1 ............. 7 .5 ..... 0,0,0,0,0,0,0,0,0,0,0 ..... 11
Programs
-
Mathematica
With[{nn=11},Riffle[Table[PadRight[{},Prime[n],0],{n,1,nn,2}],Table[ PadRight[ {},Prime[n+1],1],{n,1,nn,2}]]//Flatten] (* Harvey P. Dale, Nov 28 2018 *)