I have a cool program that will calculate the driving and driven gear to achieve a ratio. You need to specify a tolerance. I plan to improve it because often the gears have too many teeth to be practical. To fix this I need to factor the driven and driving gears. Some solutions may take 3 or more gears to achieve the correct ratio without the number of teeth on any gear being to large. I really need to put have a parameter to limit solutions. I need to add a parameter for if the final gear is turning the same direction as the initial gear. I also need to have a parameter that limits the number of teeth on a gear.
A while back drbitboy challenged me with finding solution to the size of a box by factoring. I had a python program already.