A138885 n-th run has length n-th nonprime number, with digits 0 and 1 only, starting with 1.
1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 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, 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
Offset: 1
Examples
.n ..... Run ................... Length .1 ..... 1 ..................... 1 .2 ..... 0,0,0,0 ............... 4 .3 ..... 1,1,1,1,1,1 ........... 6 .4 ..... 0,0,0,0,0,0,0,0 ....... 8 .5 ..... 1,1,1,1,1,1,1,1,1 ..... 9
Crossrefs
Programs
-
Mathematica
Join[{1},{PadRight[{},#[[1]],0],PadRight[{},#[[2]],1]}&/@Partition[Select[Range[ 20],CompositeQ],2]]//Flatten (* Harvey P. Dale, May 26 2023 *)
Comments