total=0;
for i=1:iMax
    % term t(i) to add the sum
    ti=1/i^2;
    % add to total
    total=total+ti;
end
total
