A straight wire is placed in a magnetic field that varies with distance $x$ from origin as $B = B_0 (2 - \frac{x}{n}) \hat{k}$. The ends of the wire are at $(a, 0)$ and $(2n, 0)$ and it carries a current $I$. If the force on the wire is $F = 1 B_0 \left(\frac{k a}{2}\right) \hat{j}$, then the value of $k$ is