% hw018.m
% John Burkardt
% A variation of the Fibonacci sequence.
%
fcur = 2;
fnew = 1;

for i = 1 : 10

  fold = fcur;
  fcur = fnew;
  fnew = fcur + fold;

  fprintf ( '  %d  %d  %d  %d\n', i, fold, fcur, fnew );

end
