x0 = 2;
x1 = 4/3;

xp = x1;
xpp = x0;
n = 2;
while true
	xNext = (-4 + 10*xp - 3*xpp)/3;
	xpp = xp;
	xp = xNext;
	xnExact = (1/3)^n + 1;
	fprintf('x(%d) = %e \t exact: %e\n', n, xNext, xnExact);
	n = n+1;
	waitforbuttonpress;
end