Trial and error mostly.
Probably the fastest brute force way is to build a spreadsheet that will calculate energies/wavelengths for every combination of n1 and n2 between - say - 1 and 7 (mostly copy and paste, so quite quick), and look for values from the table.