Each magnet experiences a repulsive force.
The force between a magnet and an object = ($G*m1*m2$)/$d^2$
$d$ is the distance between the magnet and the object with mass $m1$ and $m2$.
$G$ is some constant.
Equilibrium occurs when pulling force from magnets in right is equal to those in left.
I have tried binary search to find some points, but I can't prove that there are $n - 1$ equilibrium point.