The summation over neighboring spins can be rewritten as formula_33 where formula_34 means 'nearest-neighbor of formula_35' and the formula_36 prefactor avoids double-counting, since each bond participates in two spins.