# Coding challenge

Write some code to set $a_0=1$, $b_0=1/\sqrt{2}$, and $s_0=1/2$, iterate with $a_k=\frac{a_{k-1}+b_{k+1}}{2}$, $b_k=\sqrt{a_{k-1}b_{k-1}}$, $c_k-a_k^2-b_k^2$, $s_k=s_{k-1}-2^kc_k$ then $p_k=\frac{2a_k^2}{s_k}$. What number does $p_k$ eventually converge to? (Ref: Borwein, p.75.)