Let $U$ be uniform on $[0,1]$. For any given real number $a$ let $\lfloor a \rfloor$ denote the largest integer no greater than $a$. If $q$ is a given constant such that $q \in (0,1)$
Find the pmf of $X = 1+\left\lfloor\frac{\ln U}{\ln q}\right\rfloor$.
I get an idea of what is going on by look at the question Find the probability mass function of the (discrete) random variable $X = Int(nU) + 1$. My problem is I can't quite figure out how to handle the $\log$ functions and the fact that $\ln q$ in not always an integer.