  First principles calculations based on density functional theory (DFT) are
performed to study the electronic properties of Mg acceptors in AlN at the
presence of oxygen. It is found that Mg and O tend to form complexes like Mg-O,
Mg$_2$-O, Mg$_3$-O and Mg$_4$-O which have activation energies about 0.23 eV
lower than that of Mg (except of the passive Mg-O). The lower activation
energies originate from the extra states over valence band top of AlN induced
by the passive Mg-O. By comparing to the well-established case of GaN, it is
possible to fabricate Mg and O codoped AlN without MgO precipitate. These
results suggest the possibility of achieving higher hole concentration in AlN
by Mg and O codoping.
