Solution (source code)

= Solution

Let $\mathbf r_P$ be the initial position, $\hat{\mathbf b}=\mathbf B/B$, and $\Omega=qB/m$, including the sign of $q$. Solving $\dot{\mathbf v}=\Omega\mathbf v\times\hat{\mathbf b}$ gives
$$
\mathbf v(t)=\mathbf v_0\cos\Omega t+(\mathbf v_0\times\hat{\mathbf b})\sin\Omega t.
$$
Thus
$$
\boxed{\mathbf r(t)=\mathbf r_P+\frac{\mathbf v_0}{\Omega}\sin\Omega t+\frac{\mathbf v_0\times\hat{\mathbf b}}{\Omega}(1-\cos\Omega t).}
$$
The locus is a circle in the plane perpendicular to $\mathbf B$, centred at $\mathbf r_c=\mathbf r_P+(\mathbf v_0\times\hat{\mathbf b})/\Omega$, with
$$
\boxed{|\mathbf r-\mathbf r_c|=\frac{m|\mathbf v_0|}{|q|B},\qquad(\mathbf r-\mathbf r_P)\cdot\mathbf B=0.}
$$
This also follows by equating the magnetic force to the <centripetal force>. The nonrelativistic angular frequency is $|q|B/m$.