Representing Ratio's in Algebraic Formulae

Okay so i'm looking to create algebraic formula's specific ratio's. This relates to interval relationships in a musical scale for example:

An octave has ratio of 2:1 which is represented by the following formula:

$\displaystyle

\displaystyle \frac {f2}{f1}=2^n$

where n = the number of octaves.

So if i wanted to find the value of the frequency 10 octaves above 20 hertz i would say:

$\displaystyle \displaystyle \frac {f2}{20}=2^{10}$

$\displaystyle \displaystyle f2=(20)(1,024)$

$\displaystyle \displaystyle f2=20,480$

So i'm wondering how you would formulate this for other frequency ratios. i.e:

3:2, 5:4 etc.

Any help would be great.

Cheers

BIOS