function geom_sum = geom_series(a,r,N)
%computes the geometric series with N
%terms and common ration r and first term a 
%PC MA 302 2/7

geom_sum=0;
for index =1:N
    geom_sum = geom_sum + a*r^(index-1);
end
end