sum from i=2 to n of (i+1)/2