Example: 240
Example: 7/8


The information used for the calculations was taken from the Kerbal Space Program wiki
The formulas used to calculate the resonance orbit itself was posted by PakledHostage in his Figaro GPS thread.