I thought of this same question several months ago during one of my classes and I worked out the solution during my lunch break, the same sort of argument could be used to find the number of representations of $n$ in any arithmetic sequence modulo a positive integer. I got that if $S(n)$ denotes the number of representations of $n$ as a sum of successive natural numbers with $n\ge 1$ then that:
$$S(n)=d(\frac{n}{2^{v_2(n)}})$$
Where $v_2(n)$ is the $2$-adic order of $n$, what I did was used the fact that:
$$\sum_{\substack{a^2+ab=n\\(a,b)\in \mathbb{N^2}}}f(a,b)=\sum_{\substack{b=\frac{n}{a}-a\\(a,b)\in \mathbb{N^2}}}f(a,b)=\sum_{\substack{d\mid n\\d<\sqrt{n}}}f(d,\frac{n}{d}-d)$$
To rewrite: $$S(n)=\sum_{\substack{a+(a+1)+(a+2)+\dots +(b-1)+b=n\\b\ge a\\(a,b)\in \mathbb{N^2}}}1=\sum_{\substack{(a+b)(a-b+1)=2n\\b\ge a\\(a,b)\in \mathbb{N^2}}}1=\sum_{\substack{a^2-b^2+a+b=2n\\b\ge a\\(a,b)\in \mathbb{N^2}}}1$$
And then simplified the resulting sum by swapping the summation indices several times and by setting $b=a-1+k$ with $k\in \mathbb{N}$ since we have that $b\ge a$.
This was the proof I scribbled down, where I used $\chi_2$ to denote the Dirichlet character modulo $2$.
Sorry if it's kind of messy:
![enter image description here](https://cdn.statically.io/img/i.sstatic.net/DRzUQ.jpg)