function ps = mystery(x0)

g=@(x) 2.^(-x);
N0 = 5;

ps(1) = x0;

x(1) = x0;
for j = 2:N0
 x(2) = g(x(1));
 x(3) = g(x(2));
 ps(j) = x(1) - (x(2)-x(1))^2/(x(3)-2*x(2)+x(1));

 x(1) = ps(j);
end
ps = ps(:);

end%function