how to write in correct way:
to calculate the sum of odd numbers between 1 and n;
to calculate the sum of even numbers between 2 and n;
my suggestion about odd numbers:
n
E (i+2) --> do you agree?
i=2
$\displaystyle \displaystyle\sum_{i=2}^n(i+2)=4+5+6+.....+(n-1)+n+(n+1)+(n+2)$
Instead...for n odd
$\displaystyle \displaystyle\sum_{i=1}^{\frac{n+1}{2}}(2i-1)=1+3+5+...+n$
or
$\displaystyle \displaystyle\sum_{i=0}^{\frac{n-1}{2}}(2i+1)=1+3+5+...+n$
for n even, sum of the odd numbers is...
$\displaystyle \displaystyle\sum_{i=1}^{\frac{n}{2}}(2i-1)=1+3+5+...+(n-1)$
or
$\displaystyle \displaystyle\sum_{i=0}^{\frac{n-2}{2}}(2i+1)=1+3+5+...+(n-1)$
That's if "between" is meant to include i=1 and i=n, rather than exclude them