format long

z(1)=2;
z(2)=2;

for n=2:30
  z(n+1) = 2^(n-1/2) * sqrt(1 - (sqrt(1 - 4^(1-n) * z(n)^2)));
  z(n+1)
end

y = log(abs(z-pi));
grid;
plot(y);
