  We introduce a $d$-dimensional system of charged harmonic oscillators in a
magnetic field perturbed by a stochastic dynamics which conserves energy but
not momentum. We study the thermal conductivity via the Green-Kubo formula,
focusing on the asymptotic behavior of the Green-Kubo integral up to time $t$
(i.e., the integral of the correlation function of the total energy current).
We employ the microcanonical measure to calculate the Green-Kubo formula in
general dimension $d$ for uniformly charged oscillators. We also develop a
method to calculate the Green-Kubo formula with the canonical measure for
uniformly and alternately charged oscillators in dimension $1$. We prove that
the thermal conductivity diverges in dimension $1$ and $2$ while it remains
finite in dimension $3$. The Green--Kubo integral calculated with the
microcanonical ensemble diverges as $t^{1/4}$ for uniformly charged oscillators
in dimension $1$, while it is known to diverge as $t^{1/2}$ without magnetic
field. This is the first rigorous example of the new exponent $1/4$ in the
asymptotic behavior for the Green-Kubo integral.
  We also demonstrate that our result provides the first rigorous example of a
diverging thermal conductivity with vanishing sound speed. In addition,
employing the canonical measure in the Green-Kubo formula, we prove that the
Green-Kubo integral for uniformly and alternately charged oscillators
respectively diverges as $t^{1/4}$ and $t^{1/2}$. This means that the exponent
depends not only on a non-zero magnetic field but also on the charge structure
of oscillators.
