Solving $2^n - 2\times n = a $, where $a$ is a known constant.
This is my first question. I am having trouble solving the equation in the title...moreover I do not even know the name of that kind of equations. Any help would be veeeery appreciated.
Solving $2^n - 2\times n = a $, where $a$ is a known constant.
This is my first question. I am having trouble solving the equation in the title...moreover I do not even know the name of that kind of equations. Any help would be veeeery appreciated.
\begin{align} 2^n-2n=a &\iff e^{\ln{(2)}n}=2n+a\\ &\iff 1=(2n+a)e^{-\ln{(2)}n}\\ &\iff -\frac{\ln{(2)}}2=\left(-\ln{(2)}n-\frac{\ln{(2)}a}2\right)e^{-\ln{(2)}n}\\ &\iff -\frac{\ln{(2)}}2e^{-\ln{(2)}a/2}=\left(-\ln{(2)}n-\frac{\ln{(2)}a}2\right)e^{-\ln{(2)}n-\ln{(2)}a/2}\\ &\iff W_k\left(-\frac{\ln{(2)}}2e^{-\ln{(2)}a/2}\right)=-\ln{(2)}n-\frac{\ln{(2)}a}2\\ &\iff n=-\frac{a}2-\frac1{\ln{(2)}}W_k\left(-\frac{\ln{(2)}}2e^{-\ln{(2)}a/2}\right)\\ &\iff n=-\frac{a}2-\frac1{\ln{(2)}}W_k\left(-\frac{\ln{(2)}}{2^{a/2+1}}\right)\\ \end{align} Here $W_k(z)$ denotes the $k$th branch of the Lambert-W function.