User:Quasarbooster

$$\begin{matrix} W_0(n)=n+1\\ W_k(n)=\frac{2-W_{k-1}(n)\!\!\!\mod(n+2)+|2-W_{k-1}(n)\!\!\!\mod(n+2)|}2\left(\frac{W_{k-1}(n)-1}{n+2}\right)+\frac{W_{k-1}(n)\!\!\!\mod(n+2)-|2-W_{k-1}(n)\!\!\!\mod(n+2)|}2\left((W_{k-1}(n)-1)(n+2)^{dk}+\left(W_{k-1}(n)\!\!\!\mod(n+2)^d-1\right)\frac{(n+2)^{dk}-1}{(n+2)^d-1}\right)\\ \text{where }d=\min\left(p:\left\lfloor\frac{W_{k-1}(n)}{(n+2)^p}\right\rfloor\!\!\!\mod(n+2)<W_{k-1}(n)\!\!\!\mod(n+2)\right) \end{matrix}$$