Formula to generate sequence while enforcing a particular number within X items I need to generate a sequence of 0s and 1s. I want to ensure that there's always at least one 1 within a sequence of 8 numbers. What formula do I use to generate this sequence?
One option would be enforce a 1 on every 8th number and then use different probabilities for the remaining 7 items. However, I would prefer avoiding a sequence as predictable as this.

Or, just generate integers in the range 1..255, and represent them in binary.
