# 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

## 2 Answers

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.

The sum of an arithmetic progression is the number of terms times the average element.

IF the number of terms is odd, then the average element is an integer, so you should look to write 2015 as as a product where the first factor is odd (which is not much of a demand since there can't be an even factor of 2015).

If the number of terms is even (and the step size is 1), then the average element is a half-integer, so you should look to write 4030 as a product where the first factor is even and the second is odd.

In each of these cases find out which factorizations lead to the first element of the progression being positive.

• If the number of terms are odd then would I be allowed to start at 1 since 1 is a factor. – swandilaon Dec 12 '15 at 20:30
• @swandilaon: It is the number of terms times the average term, not the number of terms times the first term. Starting at 1 is "allowed" as far as it goes, though it won't give you a sum of 2015. – Henning Makholm Dec 12 '15 at 21:57