OFFSET
1,1
EXAMPLE
.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
MATHEMATICA
Join[{1}, {PadRight[{}, #[[1]], 0], PadRight[{}, #[[2]], 1]}&/@Partition[Select[Range[ 20], CompositeQ], 2]]//Flatten (* Harvey P. Dale, May 26 2023 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Omar E. Pol, Apr 06 2008
STATUS
approved