Question: I'm not very experienced at math, though I find it very interesting most of the time. I am writing a program where I need to find $n$ in $x = \sqrt[n]{y}$, given $x$ and $y$. I have implemented it using a loop, with a 'guess and check' type of method. I keep feeling, however, like there is already some simpler way to do this. What am I looking for here?

Answer: 
Assuming that $x,y >0$ you can just take logarithms
$$
x = \sqrt[n]{y}\Leftrightarrow \log x = \frac 1n \log y \Leftrightarrow n = \frac{\log y}{\log x}.
$$
Besides the exact answers the others posted, the general approach you've already tried (trial and error) includes an established [Bisection Method](https://en.wikipedia.org/wiki/Bisection_method), which converges rather quickly.