Solution (source code)

= Solution

In plane polar coordinates the radial component of <Newton's second law> is $m(\ddot r-r\dot\theta^2)=-U'(r)$. A <central force> has zero torque, so <angular momentum> $J=mr^2\dot\theta$ is constant. Therefore
$$
\boxed{m\ddot r=-U'(r)+\frac{J^2}{mr^3}=-U_{\rm eff}'(r),\qquad
U_{\rm eff}=Br^n+\frac{J^2}{2mr^2}.}
$$
For a nonzero-angular-momentum circular orbit at $r_0$, $nBr_0^{n+2}=J^2/m$. The curvature there is
$$
U_{\rm eff}''(r_0)=n(n+2)Br_0^{n-2}.
$$
Thus a stable circular orbit, and nearby bound orbits, require $\boxed{nB>0,\ n>-2}$, with $n=0$ excluded. For $n>0$, $B>0$ confines the particle at large radius; for $-2<n<0$, $B<0$ permits bound energies between the effective-potential minimum and zero. At $n=-2$ there is no isolated stable minimum.

The angular frequency is $\Omega^2=nBr_0^{n-2}/m$, and radial perturbations have frequency $\kappa=\sqrt{n+2}\,\Omega$. A rational ratio $\kappa/\Omega$ closes the \i[linearized] near-circular trajectory. It does not prove finite-amplitude closure. <Bertrand's theorem> supplies the stronger conclusion: \b[every bound orbit is closed only for $n=-1$ and $n=2$] among these smooth attractive power-law potentials. Particular circular or resonant orbits must not be confused with that all-orbit statement.

For $n=2+\epsilon$, the slowly rotating elliptical orientation has angular speed
$$
\Omega_{\rm prec}=\Omega-\frac\kappa2
=\Omega\left(1-\frac{\sqrt{4+\epsilon}}2\right)
=\boxed{-\frac\epsilon8\Omega+O(\epsilon^2\Omega).}
$$
This is retrograde for $\epsilon>0$ in the near-circular approximation. Consecutive radial maxima are separated by approximately $\pi$ in azimuth; the ellipse's axis is defined modulo $\pi$, which accounts for the factor of two relative to a Kepler-style apsidal convention.