How often is $a^b$ rational when $a,b>0$ are irrational. This question was motivated by the proof of the existence of irrational numbers $a,b$ such that $a^b$ is rational. I am wondering how many such numbers there are. 

Let $\mathbb I = \mathbb R_+ \setminus \mathbb Q$ ( I'm choosing positive numbers to avoid complex numbers). Now consider the following set $P= \{ (x,y) \in \mathbb I \times \mathbb I \, \, | \, \, x^y \in \mathbb Q \}$. Now is it true that $\overline{P} = (\mathbb R_+ \cup \{0\})\times (\mathbb R_+ \cup \{0\})$ ?
Let $q &gt; 0; q \in \mathbb Q$.  Let $a$ be irrational such that $a^r \ne q$ for any $r \in \mathbb Q$.  (For instance let $a$ be transcendental; or if $q = 2$ and $a = \sqrt 3$)  Then $b = \log_a q$ is irrational.

Then $a^b = a^{\log_a q} = q$.

There are a huge number of these and easy to find.

Second part.  Let $S = \{(x,\log_x q)| x \text{ transcendental}; x &gt; 0; q \in \mathbb Q^+\} \subset P$.

Technically $S = \cup_{x\in \mathbb T}\{x\} \times \{\log_x q| q \in Q\}$

It's obvious $\{\text {positive transcendental}\}$ is dense in $\mathbb R^{\ge 0}$.  (Their complement, the algebraics, are countable for one thing).  Likewise for any $x &gt; 0; x\ne 1$ and any positive $w &lt; z$ we can find rational $q$ so that $q$ is between $x^w$ and $x^w$ which are not equal.  So $w &lt; \log_x q &lt; z$. And so for any positive real $x; x \ne 1$, in particular for any positive transcendental $x$, $\{\log_x q| q \in \mathbb Q+\}$ is dense in $\mathbb R^{\ge 0}$.

So $\overline S = \overline{\cup_{x\in \mathbb T}\{x\} \times \overline{\{\log_x q| q \in Q^+\}}}=\overline{\cup_{x \in \mathbb T}\{x\} \times \mathbb R^{\ge 0}} = \mathbb R^{\ge 0} \times \mathbb R^{\ge 0}$

So $(\mathbb R^{\ge 0})^2\ = \overline{S} \subset \overline{P} \subset (\mathbb R^{\ge 0})^2$
Take any open interval, map it forward by raising to a power $b\in\mathbb I$, then the image open set must contain some rational number $q/p$ with $p$ prime.