<s>[INST] modify sequence so it converges to pi Modify sequence  by Archimedes 
$s_{n+1}=\frac{2^{n+1}}{ \sqrt{2} } \sqrt{ 1 -\sqrt{1-(s_n/2^{n})^2}}; s_2=2\sqrt{2} $
so that it approaches $\pi$

the issue is that it is going to $0$ 
$$\lim_{n\to \infty} \sqrt{1-(s_n/2^n)^2}=1 $$
making $s_{n+1}$ go to $0$
Now
$$ \begin{aligned}
&\sqrt{1-\sqrt{1-(s_n/2^n)^2}} * \sqrt{1-\sqrt{1-(s_n/2^n)^2}} 
\\&=\sqrt{(1-\sqrt{1-(s_n/2^n)^2}) * (1-\sqrt{1-(s_n/2^n)^2)}}
\\&=\sqrt{1 +\sqrt{1-(s_n/2^n)^2} - \sqrt{1-(s_n/2^n)^2}+1 - (\frac{s_n}{2^n})^2}
\\&=\sqrt{2-(\frac{s_n}{2^n})^2}
\end{aligned}$$
multiplying it  $s_{n+1}$ by $\frac{ \sqrt{1+(s_n/2^n)^2} }{\sqrt{1+(s_n/2^n)^2}}  $
$$s_{n+1}=\frac{2^{n+1}}{ \sqrt{2} } \sqrt{ 1 -\sqrt{1-(s_n/2^{n})^2}}*  \frac{ \sqrt{1+(s_n/2^n)^2} }{\sqrt{1+(s_n/2^n)^2}}$$
is
$$S_{n+1} = \frac{\frac{2^{n+1}}{\sqrt{2}} * \sqrt{2-(\frac{s_n}{2^n})^2}}{\sqrt{1+\sqrt{1-(\frac{s_n}{2^n})^2}}}$$
need to see if that goes to $\pi$ better. need to throw it to a for loop and see that it dosent go to zero 
Appreciate feedback 
 [/INST] In the end what you should get is $$s_n=2^n\sin\frac\pi{2^n}$$ so that indeed 
$$
\lim s_n=\lim_{x\to0}\frac{\sin(\pi x)}{x}=\frac{d\sin(\pi x)}{dx}\Big|_{x=0}=\pi\cos(0)=\pi.
$$
As said in the comments, the formula arises by inscribing first a square into the circle and then refine it by halving the angles in the regular polygon. $s_n$ is half the perimeter of the $2^n$-gon.

Let's see how the formula emerges.  For $n=2$ we have $s_2/4=(\sqrt{2})/2=\sin(\pi/4)$.  Then if one sets $s_n/2^n=\sin\theta_n$, then the given formula leads to
$$
(1/\sqrt{2})\sqrt{1-\sqrt{1-\sin^2θ_n}}=\sqrt{(1-\cosθ_n)/2}=\sqrt{\sin^2(θ_n/2)}=\sin(θ_n/2)
$$
which matches the required formula for $(s_{n+1})/(2^{n+1})$.
</s>