How to show that $\log_{10} n$ is not a rational number if $n$ is any integer not a power of $10.$ 
How to show that $\log_{10} n$ is not a rational number if $n$ is any integer not a power of $10.$


*

*If not, let $\log_{10}n=\dfrac{p}{q}$ for some $p,q(\ne0)\in\mathbb Z$ where $(p,q)=1.$
Then $q\log_{10}n=p\implies\log_{10}n^q=p\implies\log_{10}n^q=\log_{10}10^p\implies n^q=10^p$.
I don't know what to do next.
Added: I can see $5,2$ are the only prime factors of $n.$ But I cant get why the same number of 5 and 2 would occur in $n?$
 A: What you had written brought you close to the end. We show how to finish. 
From the assumption $\log_{10} n=p/q$ we obtain $10^{p/q}=n$ and therefore $10^p=n^q$.
The only primes that divide $n$ are $2$ and $5$. Suppose that $2^a$ is the highest power of $2$ that divides $n$. Then $aq=p$. Similarly, if $5^b$ is the highest power of $5$ that divides $n$, then $bq=p$. It follows that $a=b$.
We have implicitly used the Fundamental Theorem of Arithmetic: Every integer $\gt 1$ has a unique (apart from order) factorization as a product of prime powers. 
A: As you say, if $\log_{10}(n)=p/q$, then
$$
n^q=2^p5^p
$$
implies that $q\,|\,p$ and that $n=2^{p/q}5^{p/q}=10^{p/q}$.
A: Your penultimate result of
$n^p = 10^q$
is correct, but your final one should be
$n = 10^{p/q}$.
Since $n^p = 10^q$,
all prime factors of $n$
must be $2$ or $5$.
Let $n = 2^a 5^b$.
Then
$n^p = 2^{ap}5^{bp}$
and $10^q = 2^q 5^q$.
By unique factorization,
$ap = q$ and $bp = q$
so that
$a = b$
and $n = 10^a$,
so $n$ $is$ a power of $10$.
