function sum=funk2(M,N)

sum=0;

for i=M:N
  term=1/i^2; 
  sum=sum+term;   
end

