How to calculate $x,n$ for $x^n=400$

55 Views Asked by At

Basically, what I'm trying to figure out is:

If I have a directory tree, and each level of the directory tree has $x$ directories, and there are $n$ levels, then the number of directories at level $n$ is $x^n$.

So, If I want to generate a structure, that at level $n$ has 400 directories, then I need to figure out $x, n$ for $x^n = 400$

At this point, I think I'm basically trying to get $x = \sqrt[n]{400}$

Is it possible to figure this out with just these terms? I'm not super great at math, so any help would be appreciated!

1

There are 1 best solutions below

1
On BEST ANSWER

You can do better since you know that $x$ and $n$ are integers. Since $400=4\times 10^2 = 2^4 5^2$, then $x^n=2^4 5^2$ implies that $n$ is a common divisor of $4$ and $2$. So $n=2$ or $n=1$.

If $n=1$, then $x=400$ and if $n=2$, then $x=20$ (since $x^2=2^4 5^2 \iff x=(2^4 5^2)^{1/2}=2^2 5^1=20$).