Perhaps this is a very basic question, but I can't find a fast solution.
I have a cyclic interval [0,n] (distance from n to 0 is 1). I need a function that for a given value x returns the point in the interval where it maximizes the distance to all previous points (x-1, x-2...)
For instance, if n=100 and f(0) = 0
f(1) = 50
f(2) = 25
f(3) = 75
f(4) = 12'5
f(5) = 37'5
f(6) = 62'5
f(7) = 87'5
f(8) = 6'25
f(100) = ??
Note that f(0)=0 is for convinience, but you may start at f(0)=50.
At the end, what I need is that an uniform distribution for {f(0), f(1)... f(n)}