close all; clear; clc

x = zeros(8, 1);
for n = 2:8
    x(n) = x(n-1) + n^2;
end
disp(x);