Integer Solutions To Optimization Problems And Modular Sequences Of Nexus Numbers