Originally Posted by

**Barbas** Hey guys i'm looking to prove that if $\displaystyle N = a^b$ then we are sure that either $\displaystyle b \leq \log(N)$ either $\displaystyle N = 1$ is true, where a,b,N are all positive integers.

And using that (i suppose, but not necessarily), to create an algorithm that given an integer can verify whether it's a power (i mean it can be written in the $\displaystyle N = a^b$ form).

What i've done is $\displaystyle N = a^b \Rightarrow \log(N) = b\log(a)\Rightarrow b = \frac{\log(N)}{\log(a)} \leq \log(N)$ Provided that a!=1

Then used $\displaystyle b \leq \log(N)$ as a fact to prove that when N=1 if $\displaystyle b \leq \log(N)$ also applies then $\displaystyle b\leq0$ which is impossible since we know b>0

Is that correct?

Thanks!