# Determine all ways the integer $2015$ can be written as a sum of consecutive positive integers.

Q) Determine all ways the integer $2015$ can be written as a sum of (more than one) consecutive positive integers. Prove that you have found all possible combinations.

I was thinking of using Gauss' formula where

Sum=$\frac{n(n+1)}{2}$ Since we want the sum to be $2015$ then $2015=\frac{n(n+1)}{2}$ and then we are left with $4030=n(n+1)=n^2+n$

but then I got stuck. Any ideas?

• Rewrite it as $n^2+n-4030=0$ and solve this as a quadratic equation in the variable $n$. Actually you should aslo try sum of consecutive integers from some $a$ to $b$. – P Vanchinathan Dec 12 '15 at 1:39
• – lhf Dec 12 '15 at 1:46

Hint: Your thought is a good one, but Gauss' formula presumes you start adding from $1$. If you add from $m$ through $n$, the sum is $\frac {n(n+1)}2-\frac{(m-1)m}2$ because you subtract the sum from $1$ through $m-1$. You should be able to factor this.