Suppose you want to line up $2^n$ balls of which $x$ are black the rest are white. Find a general method to do this so that the black balls are as dispersed as possible, assuming that the pattern will repeat itself ad infinitum. The solution can be in closed form, iterative, or algorithmic.
For example, if $n=3$, where $0$ is a white ball and $1$ is a black ball, a solution is:
x=0: 00000000... x=1: 10000000... x=2: 10001000... x=3: 10010010... x=4: 10101010... x=5: 01101101... x=6: 01110111... x=7: 01111111... x=8: 11111111...