# fun constants 2: r

Let r be the unique real number such that $(r-1)^{r} = r$. $r\approx$2.4413754618570030342085445640326490248139472302… or so.
There is an elegant relationship between $r$ and the lambert W function:
observe that if
$(r-1)^{r} = r$
Then
$(r-1)^{r} = (r-1)^{(r-1)^{r}}$
Which means that the infinite tetration of $(r-1)$ is $r$, and
the infinite tetration or power tower is expressible in terms of the Lambert W function.

So we’ve got:
$r = - \frac{W(-\log(r-1))}{\log(r-1)}$
Now, if we move that $r$ to the other side, we get:
$1 = - \frac{W(-\log(r-1))}{r \log(r-1)}$
since $(r-1)^{r} =r, then$latex r\log(r-1} = \log{r}$, so we can rewrite the bottom like this: $1 = - \frac{W(-\log(r-1))}{\log(r)}$ Then: $\log(r) = - W(-\log(r-1))$ Then $r = e^{-W(-\log(r-1))}$ But since$latex $(r-1)^{r} =r$, then
$r \log(r-1) = \log(r)$ and finally $-\log(r-1) = \log\left(\frac{1}{\sqrt[r]{r}}\right)$

So, we’ve got
$r = e^{-W(\log\left(\frac{1}{\sqrt[r]{r}}\right))}$