Equation $x = \tau(2^x - 1)$ I want to find all integer solutions of the equation $x = \tau(2^x – 1)$, where $\tau(n)$ is the number of divisors of n.
I know that 1, 2, 4, 6, 8, 16 and 32 are solutions, but I have no idea how to solve this equation in general.
Any help will be appreciated.
 A: For all natural numbers $n$ and prime $p$, let $e_p(n)$ be the exponent of the highest power of $p$ dividing $n$. $\omega(n)$ is the amount of unique prime factors of $n$ and $\Omega(n)$ is the amount of prime factors of $n$ counting multiplicity. 
Lemma 1 For all natural numbers $n\in\mathbb{N}$ and prime numbers $p$ we have:
$$\omega(2^{p^{n}}-1)\ge n$$
Proof: We will prove this by induction. It is clear that $\omega(2^p-1)\ge 1$. Now, assume that $\omega(2^{p^{n-1}}-1)\ge n-1$. We'll now prove that $\omega(2^{p^n}-1)\ge n$. We know that:
$$2^{p^n}-1=(2^{p^{n-1}}-1)(2^{p^{n-1}(p-1)}+2^{p^{n-1}(p-2)}+\ldots+1)$$
So it is enough to prove that:
$$\gcd(2^{p^{n-1}}-1,2^{p^{n-1}(p-1)}+2^{p^{n-1}(p-2)}+\ldots+2^{p^{n-1}}+1)=1$$
We know that:
$$2^{p^{n-1}(p-1)}+2^{p^{n-1}(p-2)}+\ldots+2^{p^{n-1}}+1\equiv p\pmod {2^{p^{n-1}}-1}$$
So:
$$\gcd(2^{p^{n-1}}-1,2^{p^{n-1}(p-1)}+2^{p^{n-1}(p-2)}+\ldots+2^{p^{n-1}}+1)=\gcd(2^{p^{n-1}}-1,p)$$
now, it is enough to show that $2^{p^{n-1}}\not\equiv 1\pmod p$ and that is fairly obvious (hint: FLT). We are now done with the induction step, so we have proven by induction that $\omega(2^{p^n}-1)\ge n$. Q.E.D.
Lemma 2 For all natural numbers $n\in\mathbb{N}$ we have:
$$\omega(2^n-1)\ge\Omega(n)$$
Proof: Write:
For all prime powers $p^k\mid n$ we have $2^{p^k}-1\mid 2^n-1$. Now, take two primes $p\neq q$ and two integers $k$ and $\ell$. Let $d=\gcd(2^{p^k}-1,2^{q^{\ell}}-1)$. It is clear that there exists some $r$ such that for all natural $m$:
$$d\mid 2^m-1\Longleftrightarrow r\mid m$$
Therefore $r\mid \gcd(p^k,q^\ell)=1$, so $d\mid 2^1-1=1$, so $d=1$. We conclude that $2^{p^k}-1$ and $2^{q^\ell}-1$ are coprime, so:
$$\omega(2^n-1)\ge \sum_{p\mid n}\omega(2^{p^{e_p(n)}}-1)$$
It now follows directly from lemma 1 that $\omega(2^n-1)\ge\Omega(n)$. Q.E.D.
Lemma 3 For all natural numbers $n\in\Bbb{N}$, we have:
$$\Omega(\tau(n))\ge \omega(n)$$
Proof: We can write:
$$\tau(n)=\prod_{p\text{ prime}}(e_p(n)+1)$$
The amount of factors in the RHS not equal to $1$ is $\omega(n)$, but the amount of factors in the RHS not equal to $1$ is also less than or equal to $\Omega(\tau(n))$ and we are done. Q.E.D.

With these three lemmas we can finally take a look at your problem. Suppose that for some $n$ (I use $n$ instead of $x$) we have that:
$$n=\tau(2^n-1)$$
So:
$$\Omega(n)=\Omega(\tau(2^n-1))$$
By lemma $3$ we may conclude that:
$$\Omega(n)\ge \omega(2^n-1)$$
But lemma $2$ says that $\omega(2^n-1)\ge \Omega(n)$, so we conclude that:
$$\Omega(n)=\omega(2^n-1)$$

Now, we proceed with @barto's proof in the comments. A quick test reveals that $n=6$ is solution. For the rest of the proof, we may assume that $n\neq 6$. Zsigmody's theorem now gives:
$$\Omega(n)=\omega(2^n-1)\ge\tau(n)-1$$
or, written differentely:
$$\sum_{p\text{ prime}}e_p(n)+1\ge \prod_{p\text{ prime}}(e_p(n)+1)$$
Using induction, it can now be shown that there can only be one prime $p$ with $e_p(n)\neq 0$, so $n$ is a prime power, say $n=p^k$. 
We now have:
$$p^k=\tau(2^{p^k}-1)$$
For $p$ odd, we get that $2^{p^k}-1$ must be the square of an odd number. For $p^k>2$ this odd square is congruent to $-1$ modulo $8$, which is impossible. Testing reveals $n=1$ and $n=2$ are possible options. For the rest, we must have $p=2$. Then, for all positive integers $j<k$, we have:
$$\frac{2^{p^{j+1}}-1}{2^{p^j}-1}=2^{2^j}+1$$
prime. However, $2^{2^5}+1$ is not prime, so $k\le 5$. This gives the candidate solutions:
$$n\in\{1,2,4,8,16,32\}$$
and as it turns out those all work.
We conclude that the only solutions of $n=\tau(2^n-1)$ are:
$$n\in\{1,2,4,6,8,16,32\}$$
