How to prove $\sum_{n=1}^\infty\operatorname{arccot}\frac{\sqrt[2^n]2+\cos\frac\pi{2^n}}{\sin\frac\pi{2^n}}=\operatorname{arccot}\frac{\ln2}\pi$? How can I prove the following identity?
$$\sum_{n=1}^\infty\operatorname{arccot}\frac{\sqrt[2^n]2+\cos\frac\pi{2^n}}{\sin\frac\pi{2^n}}=\operatorname{arccot}\frac{\ln2}\pi$$

Rewrite the sum as
$$\sum_{n=1}^{\infty} \arctan{\left [\frac{\sin{\left (\frac{\pi}{2^n}\right)}}{2^{2^{-n}}+\cos{\left (\frac{\pi}{2^n}\right)}}\right ]}$$
Now let 
$$a_n = \arctan{\left [\frac{\sin{\left (\frac{\pi}{2^n}\right)}}{2^{2^{-n}}-\cos{\left (\frac{\pi}{2^n}\right)}}\right ]}$$
Then one may show (nontrivial!) that
$$a_n - a_{n-1} = \arctan{\left [\frac{\sin{\left (\frac{\pi}{2^n}\right)}}{2^{2^{-n}}+\cos{\left (\frac{\pi}{2^n}\right)}}\right ]}$$
so that we have a telescoping sum:
$$\sum_{n=1}^{\infty} (a_n-a_{n-1}) = a_{\infty}-a_0$$
where 
$$a_{\infty} = \lim_{n\to\infty} a_n $$
Now,
$$\frac{\sin{\left (\frac{\pi}{2^n}\right)}}{2^{2^{-n}}-\cos{\left (\frac{\pi}{2^n}\right)}} \sim \frac{\pi/2^n}{1+\frac{\log{2}}{2^n}-1} = \frac{\pi}{\log{2}}$$
Note also that $a_0=0$.  therefore the sum is simply
$$\arctan{\frac{\pi}{\log{2}}}$$
which is the stated result.
ADDENDUM
For completeness, I'll outline a few steps to demonstrate how to prove the difference equation above.  Start with the relation
$$\arctan{p}-\arctan{q} = \arctan{\frac{p-q}{1+p q}}$$
so we need to work with the following argument of the arctangent:
$$\frac{\frac{\sin{\left (\frac{\pi}{2^n}\right)}}{2^{2^{-n}}-\cos{\left (\frac{\pi}{2^n}\right)}} - \frac{\sin{\left (\frac{2\pi}{2^n}\right)}}{2^{2^{1-n}}-\cos{\left (\frac{2\pi}{2^n}\right)}}}{1+\frac{\sin{\left (\frac{\pi}{2^n}\right)}}{2^{2^{-n}}-\cos{\left (\frac{\pi}{2^n}\right)}}\frac{\sin{\left (\frac{2\pi}{2^n}\right)}}{2^{2^{1-n}}-\cos{\left (\frac{2\pi}{2^n}\right)}}}$$
which simplifies somewhat to
$$\frac{-2^{2^{-n}} \sin \left(\pi  2^{1-n}\right)+2^{2^{1-n}} \sin \left(\pi 
  2^{-n}\right)+\sin \left(\pi  2^{1-n}\right) \cos \left(\pi  2^{-n}\right)-\sin
   \left(\pi  2^{-n}\right) \cos \left(\pi  2^{1-n}\right)}{2^{3\ 2^{-n}}+\sin
   \left(\pi  2^{1-n}\right) \sin \left(\pi  2^{-n}\right)-2^{2^{-n}} \cos
   \left(\pi  2^{1-n}\right)+\cos \left(\pi  2^{-n}\right) \cos \left(\pi 
   2^{1-n}\right)-2^{2^{1-n}} \cos \left(\pi  2^{-n}\right)}$$
Now you may show that the numerator is equal to
$$\sin \left(\pi  2^{-n}\right) \left(2^{2^{1-n}}-2^{2^{-n}+1} \cos \left(\pi 
   2^{-n}\right)+1\right)$$
and the denominator is equal to
$$2^{2^{-n}} \left(2^{2^{1-n}}-2^{2^{-n}+1} \cos \left(\pi 
   2^{-n}\right)+1\right)+\cos \left(\pi  2^{-n}\right)
   \left(2^{2^{1-n}}-2^{2^{-n}+1} \cos \left(\pi  2^{-n}\right)+1\right)$$
Cancelling the common factors in the numerator and denominator produces the desired result.
