Needs["Quanty`CrystalFieldTheory`"]

Expand[Solve[Total[Diagonal[CFOperatorU[2,2,F]]]==0,F[0]]]

Expand[Solve[Total[Diagonal[CFOperatorU[3,2,F]]]==0,F[0]]]