For given positive integers $n,k$ prove that there always exists some $x$ for which $2^n \mid \dfrac{x(x+1)}{2}-k.$
My work:
$\dfrac{x(x+1)}{2}$ is the sum of all positive integers upto $x$.
Now, if we can show,
$\dfrac{x(x+1)}{2}\equiv 0,1,\ldots,2^n-1 \mod2^n$ then we are done.
Now, two cases arise,
(i) $x=2j \implies j(2j+1)\equiv 0,1,\ldots,2^n-1$
(ii) $x+1=2j \implies j(2j-1)\equiv 0,1,\ldots,2^n-1$
Now, I have reached a deadlock. Please help.