horzLine = '________________________________________________________';
fprintf('\n\n               Homework #6, problem 1');
fprintf('\n\n   y(n) = y(n-1)^2,  y(0) = 2/3 --> y(n) = (2/3)^(2^n)');
fprintf('\n\n  n |   Analytic y(n)   |   Numeric y(n)    | Difference \n%s\n', horzLine);

y = 2 / 3;
for n = 1:13 
    y = y^2;             % Numeric solution
    yy = (2 / 3)^(2^n);  % Analytic solution
    fprintf(' %2d | %17.10e | %17.10e | %.1e \n', n, yy, y, abs(y-yy) );
end