Iterate at a different rate

So, I know about the modulo operator.
But how would i iterate through series of numbers to produce something like this,
moreover, I need to be able to start anywhere in this sequence
for example, 00111222 (from a second zero).

Thank you.
Integer division by 3.
Oh, yea...

This is exactly what i needed.
Topic archived. No new replies allowed.