The polyazoles have five-membered heterocyclic rings with N/C ratios of at least 2/3. Their high nitrogen contents result in relatively high crystal densities and large positive heats of formation, features that make them attractive as frameworks for energetic materials. However the presence of linked nitrogens (catenation) is accompanied by reduced stability (reflected in the large heats of formation). Several related factors may be involved in this, including the weakness of N-N bonds, the possibility of decomposing through release of the very stable N2(g) and the repulsion between lone pairs of neighboring nitrogens. We show that in the polyazoles a particularly important source of reduced stability is the presence of adjacent doubly-coordinated nitrogens, especially if connected by a formal double bond. Our computed polyazole electrostatic potentials are consistent with significant repulsion between the lone pairs of these nitrogens. Introducing an N-oxide linkage on one of them leads to some stabilization; the oxygen withdraws electronic charge from the heterocyclic ring, reducing the electronic repulsion within it. However the N-oxide derivatives having more nitrogen catenation are still the less stable ones. Comparing the polyazoles to the polyazines (six-membered N/C heterocyclic rings), the π electrons in the former are less delocalized and the computed bond lengths in the polyazole rings are consistent with the formal single and double bonds in their Lewis structures. An interesting consequence is that if a second N-oxide is introduced next to the original one, the bond between the two nitrogens remains intact in polyazoles if it is formally double but it is considerably weakened or broken in polyazines, and in polyazoles if formally single.