[Math] Sum of consecutive odd numbers

number theory

Is there a general formula for the sum of consecutive odd numbers. I don't mean from 1 to $n$ being $n^2$, I mean the way that the sum of one consecutive odd number is any odd number, 2 consecutive odd numbers are any even number 3 consecutive numbers are are any odd multiple of three, 4 consecutive odd numbers are any number which can be expressed as $8n$…
Is there a general pattern?

Best Answer

Yes, there is. For, suppose you want counting from $k$ to $n$ (both odd numbers, included) consecutively. The sum of all numbers, even and odd, obviously is given by (please, see $S$ formula below) $$S_{k,n}=(k+n)\frac{n-k+1}{2}.$$ But we need to eliminate all of the even numbers between $k$ and $n$, i.e. from $k+1$ to $n-1$. It is also obvious that the quantity of even numbers is one less that the quantity of odd ones, that is, $x+x-1=2x-1=n-k+1$. Thus, the number of odd and even numbers are, respectively $$on_{k,n}=\frac{n-k+2}{2} \qquad\qquad en_{k,n}=\frac{n-k}{2}.$$ So that, you may apply the well-known formula $S=(a_1+a_n)n/2$ to get $$S_{k,n}(on)=\frac{(n+k)(n-k+2)}{4}.$$ Notice that the following things.

-You can also calculate an arbitrary sequence of consecutive even numbers.

-If $k=1$, then $S_{1,n}(on)=((n+1)/2)^2.$

Related Question