Two distinct [numbers](https://artofproblemsolving.com/wiki/index.php/Number) a and b are chosen randomly from the [set](https://artofproblemsolving.com/wiki/index.php/Set) $\{2, 2^2, 2^3, ..., 2^{25}\}$. What is the [probability](https://artofproblemsolving.com/wiki/index.php/Probability) that $\mathrm{log}_a b$ is an [integer](https://artofproblemsolving.com/wiki/index.php/Integer)?
$\mathrm{(A)}\ \frac{2}{25}\qquad \mathrm{(B)}\ \frac{31}{300}\qquad \mathrm{(C)}\ \frac{13}{100}\qquad \mathrm{(D)}\ \frac{7}{50}\qquad \mathrm{(E)}\ \frac 12$
Let $\log_a b = z$, so $a^z = b$. Define $a = 2^x$, $b = 2^y$; then $\left(2^x\right)^z = 2^{xz}= 2^y$, so $x|y$. Here we can just make a table and count the number of values of $y$ per value of $x$. The largest possible value of $x$ is 12, and we get $\sum_{x=1}^{12} \lfloor\frac {25}x-1\rfloor = 24 + 11 + 7 + 5 + 4 + 3 + 2 + 2 + 1 + 1 + 1 + 1 = 62$. 
The total number of ways to pick two distinct numbers is $\frac{25!}{(25-2)!}= 25 \cdot 24 = 600$, so we get a probability of $\frac{62}{600} = \boxed{\textbf{(B) }\frac{31}{300}}$.