I have the following Leibniz series,
$$S=\sum_{n=1}^\infty(-1)^{n+1}a_n=\sum_{n=1}^\infty(-1)^{n+1}\tan\left(\frac{\pi}{2^{n+1}}\right)$$ and I am asked to find an approximation of the sum $R<\tan(10^{-5})$.
My attempt
I know that for a Leibniz series, $$R=\left|S-S_n\right|<a_{n+1}$$ So $a_{n+1}$ controls the remainder of the sum.
$$a_{n+1}=\tan\left(\frac{\pi}{2^{n+2}}\right)<\tan(10^{-5})\implies n>16$$
But I checked in Wolfram Alpha and got $S-S_{17}>\tan(10^{-5})$
What did I do wrong?
EDIT:
I got confused (because I was working with this series earlier) and what I checked in Wolfram Alpha is the following difference: $$\sum_{n=1}^\infty\tan\left(\frac{\pi}{2^{n+1}}\right)-\sum_{n=1}^{17}\tan\left(\frac{\pi}{2^{n+1}}\right)$$