The invariance properties of the Demkov-Ostrovsky (DO) equation are analysed. This equation models the n+l filling rule of the atomic Aufbau principle. Contrary to a claim by Ostrovsky and contrary to generally known quantum problems, the degeneracy structure of the quantum number n+l in this model is not associated with the representation of a finite-dimensional Lie algebra. It is found, however, that the degeneracy algebra does not close under the usual commutation relations, but under a generalised set of commutation rules. The properties of the new algebra are closely examined. It is shown that the characteristic 'period doubling' in the DO model follows from the structure of this algebra. It is also shown that the two-dimensional analogue of the DO equation admits an SO(3,2) dynamical group which, however, allows more states than the physically required ones. Nevertheless, by a redefinition of the quantum labellings, one obtains a mapping to the appropriate state diagram corresponding to the Aufbau chart.