There is a set of numbers in binary representation, like 01001000010001 10001000010001 ....
All of them have N nonzero digits and are in increasing order.
I generate another set, containing all the numbers obtained from the previously defined numbers by replacing one of the nonzero digits with 0. In this set the numbers obviously have N-1 nonzero digits. I want to generate this new list in increasing order with time complexity that is linear in the number of elements of the original set.

