This paper presents the protons and neutrons distributions in atomic nucleus shells calculation algorithm which may be used for ab initio no-core nuclear shell model computations. The problem of enumeration of many-particle states is formulated on energetic basis instead of application of the traditional scheme for states classification. The algorithm provides calculations of protons and neutrons occupation restrictions for nuclear shells for an arbitrary number of oscillator quanta. The reported results show that the presented algorithm significantly outperforms the traditional approach and may fit the needs of state-of-the-art no-core shell model calculations of atomic nuclei.