Find exact value of $\sum_{n=1}^{\infty} \frac{1}{2^{n}} \tan \left( \frac{\pi}{2^{n+1}} \right)$ How can I compute the series 
$$\sum_{n=1}^{\infty} \frac{1}{2^{n}} \tan \left( \frac{\pi}{2^{n+1}} \right)$$
I just guess using half-angle formula to compute this series, 
but I can't do any approaches.
How should I do to solve this infinite sum?
 A: $$\cot A-\tan A=2\cot2A\implies\dfrac12\tan A=\dfrac12\cot A-\cot2A$$
Using Telescoping series
$$S(m)=\sum_{n=1}^m\dfrac1{2^n}\tan\dfrac x{2^{n+1}}=\dfrac1{2^m}\cot\dfrac x{2^{m+1}}-\dfrac1{2^{1-1}}\cot\dfrac x{2^1}$$
$$\lim_{m\to\infty}S(m)=\dfrac2x-\cot\dfrac x2$$ setting $\dfrac x{2^m}=y,m\to\infty,y\to0$ and $\lim_{y\to0}\dfrac{\sin y}y=1$
Here $x=\pi$
A: $$\sum_{n=1}^\infty \frac1{2^n}\tan\left(\fracπ{2^{n+1}}\right) = 2\frac d {dπ}\sum_{n=1}^\infty \ln\left(\sec\left(\fracπ{2^{n+1}}\right)\right) = 2\frac d {dπ}\ln\left(\frac1{\prod_{n=1}^\infty\cos\left(\fracπ{2^{n+1}}\right)}\right)$$ But $$\prod_{n=1}^\infty\cos\left(\fracπ{2^{n+1}}\right) = \cos\left(\fracπ4\right)\cos\left(\fracπ8\right)\cos\left(\fracπ{16}\right)\cos\left(\fracπ{32}\right)... = \frac{\sqrt2}2\frac{\sqrt{2+\sqrt2}}2\frac{\sqrt{2+\sqrt{2+\sqrt2}}}2... = \frac2π$$
(This is Viète's formula.) Then our original sum is $$2\frac d {dπ}\ln\left(\frac1{\frac2π}\right) = 2\frac d {dπ}\ln\left(\fracπ2\right) = 2\frac{\frac12}{\fracπ2} = \frac2π$$
A: Let $$\begin{align}S(x)&=\sum_{n=1}^\infty\frac1{2^n}\tan\left(\frac{x}{2^n}\right)\\&=\frac{d}{dx}\sum_{n=1}^\infty\ln\left(\sec\left(\frac{x}{2^n}\right)\right)\\&=\frac{d}{dx}\ln\left(\prod_{n=1}^\infty\sec\left(\frac{x}{2^n}\right)\right)\\&=\frac{d}{dx}\ln\left(\lim_{m\to\infty}\left\{2^m\csc(x)\sin(2^{-m}x)\right\}\right)\\&=\frac{d}{dx}\ln(x\csc(x))\\&=\frac{(1-x\cot(x))\csc(x)}{x\csc(x)}\\&=\frac1x-\cot(x)\end{align}$$
Then we want to compute $$S(\pi/2)=\frac1{π/2}-0=\bbox[5px,border:2px solid black]{\frac2{\pi}}$$ 
This agrees with the numerical result on Wolfram Alpha.

Some other details:
I used the step $$\prod_{n=1}^m\sec(2^{-n}x)=2^m\csc(x)\sin(2^{-m}x)$$ in the computation. As Yuta pointed out in the comments, this can be proved by multliplying through by $\csc(2^{-m} x)$ and using $$\begin{align}\csc(2^{-m} x)\prod_{n=1}^m\sec(2^{-n}x)&=\frac1{\sin(2^{-m} x)}\prod_{n=1}^m\frac1{\cos(2^{-n}x)}\\&=2\frac1{\sin(2^{-m+1}x)}\prod_{n=1}^{m-1}\frac1{\cos(2^{-n}x)}\\&=\cdots\\&=2^m\frac1{\sin(x)}\end{align}$$

The limit was evaluated by doing a Taylor expansion.
