# can powers of different primes be equal?

I am reading about Hilbert's Grand Hotel and, more specifically, the proof that the Hotel can accommodate countably infinite buses of infinite passengers each using the prime powers method.

If I understand correctly this method is premised on the assumption that powers of different primes can never be equal. What might be a proof for that?

No; a consequence of the fundamental theorem of arithmetic is that if $p^k=q^\ell$ for some primes $p,q$ and natural numbers $k,\ell > 0$, then $p=q$ and $k=\ell$.

• Yeah, quite silly of me. Since there's a unique prime factorization of any given integer it follows that we MUST have p=q and k=l, so if p is not equal to q, it's impossible for their powers to be equal. – Marcus Junius Brutus Nov 23 '17 at 19:01

If $p$ and $q$ are primes and $p^m=q^n$ for some $m,n\in\mathbb N$, then $p\mid q^m$. Therefore, since $p$ is prime, $p\mid q$. Since $p$ and $q$ are both primes, $p=q$.

Suppose $p^k = q^l$ for some primes $p, q \in \mathbb{P}$, $p \neq q$. Assume $k \geq 2$. Then we have

$$p \cdot p^{k-1} = q^l$$

Hence $p$ is a divisor of $q^l$ and since $p$ is prime it is also a divisor of any of the factors of $q^l$, which means $p$ divides $q$. But since $q$ is a prime, either $p=1$ or $p=q$, which is a contradiction.

• You may wish to rephrase your answer. 20 is a divisor of 40 but its not a divisor of "any of the factors of 40" – Marcus Junius Brutus Nov 23 '17 at 18:55