I've been messing around with formulas for musical notes (trying not to read anything that would help me unless I get stuck) and currently I'm at a point where I'm trying to get a function that describes each note's frequency in terms of it's surrounding notes and specifically to find if their respective frequencies are close to a whole number ratio.
I can use a computer to calculate a table of every whole number ratio that I expect to see but I'm wondering if there is any other approach to this?
A standard way of getting approximations that involve "small" numbers is to use the continued fraction expansion.
Since you expressed a desire to work things out for yourself, I will leave it at that for now. If calculations lead to a particular problem, please ping for elaboration.