In how many ways can $2017$ be expressed as the sum of two or more consecutive positive integers? 
In how many ways can $2017$ be expressed as the sum of two or more consecutive positive integers?

Here's what I've tried (just brute force) with a little bit of thinking:
$$x+(x+1)=2017$$
A solution.
$$x+(x+1)+(x+2)=2017$$
Not a solution.
$$nx+\frac{n(n-1)}{2}=2017$$
$$x=\frac{2017}{n}-\frac{n-1}{2}$$
I think I need to chose $n$ less than or equal to $64$, that way I get $1+2+\ldots+63=2016$. If $n$ is odd an greater than $1$ we don't have a solution as it won't go into $2017$. But we need $x$ to be an integer. So I think I've limited the search to $n=2,4,6,\ldots,64$.
Is my reasoning valid and is there a more direct approach? If it is, is  there a way to go from here that would be easier than just plain brute force?
 A: There's a bijection between those representations as sums of positive integers and those representations as sums of an odd number of integers.  The bijection is to leave the representation alone if it already has an odd number of terms, and to write $-n+(-n+1)+\ldots+n$ in front of the representation if it already starts with $n+1$ and has an even number of terms.
So we can just count the number of ways to have an odd number of consecutive integers add up to $2017$: if the center number is $u$ and there are $k$ terms, then obviously the sum is $uk$.  So the number of such representations must be just the number of odd factors of $2017$.  Since $2017$ is prime, there must be only $2$ such.  But the first is just $2017$ itself, so there is only $1008+1009$ left.
This theorem can obviously be extended: the number of ways to write $n$ as the sum of positive consecutive numbers is equal to the number of odd factors of $n$; the trivial representation corresponds to the factor $1$, so you may always remove that.
A: $n $ consecutive numbers beginning with $b=a +1$ will equal $\sum_{k=1}^n (a+k)=na+\sum k=na+\frac {n (n+1)}2$.  If $n $ is odd then sum $=n (a+\frac {n+1}2) $.  If $n $ is even sum equals $\frac n2 (2a+(n+1)) $.  So either $n $ or $n/2$ is a factor of the sum.
But $2017=2017*1$ is prime so either:
$n=1$ and $2017=2017$
$n=2$ and $2a+3=2017;a=1007;b=1008$ so $2017=1008+1009$
$n=2017$ and $a+\frac {2018}2=1;a=-1008;b=-1007$ so $2017=-1007-1006-....-1+0+1+2+....+1007+1008+1009$ 
Or $n=4034$ and $2a+4035=1;a=-2017;b=-2016$ and $2017=-2016-.....+2016+2017$.
And those are the only four ways.
We can ignore all but the second as you want only two or more positive summands.
PS.  Note to have $M $ equal to an even number of summands $\frac {M}{n/2} $ must be odd.  Not relevent here but as the above gave a general method....
