For what $n$ can $\pm 1\pm 2\pm 3 ... \pm (n-1) \pm n = n+1$?

Equivalently, we want to divide the set $\{1,2,3,\dots, n+1\}$ into two parts, such that the sums of the two parts are the same. The $n+1$ is somewhat unattractive, so let us call it $m$.

A necessary condition is that the sum $1+2+3+\cdots+m=\frac{m(m+1)}{2}$ is even. We show that condition this is also sufficient.

Our necessary condition is met precisely when $m$ is of the form $m=4k$ or of the form $m=4k-1$.

Note that $(4j+1)+(4j+4)=(4j+2)+(4j+3)$. That takes care of all cases where $m$ is of the form $4k$. For any group $\{4j+1,4j+2,4j+3,4j+4\}$ can be divided into $2$ parts with equal sum.

For $m$ of the form $4k-1$, think pf our sum as starting at $0$, and use as groups $\{4j,4j+1,4j+2,4j+3\}$, dividing each group by using the fact that $4j+(4j+3)=(4j+1)+(4j+2)$.

Remark: I feel guilty about these $j$ and $k$ and $m$ and $n$. It all comes down to two sample cases: $$(1-2-3+4)+(5-6-7+8)+(9-10-11+12)=0,$$ and $$(0-1-2+3)+(4-5-6+7)+(8-9-10+11)=0.$$


As others have stated, we want a partition of $\{1, 2, ..., n+1\}$ into two sets with equal sums.

The sum is $\frac{(n+1)(n+2)}{2}$.

If $n=4k$, the sum is $(4k+1)(2k+1)$ which is odd and therefore impossible.

If $n = 4k+1$, the sum is $(2k+1)(4k+3)$ which is also odd, and therefore impossible.

If $n = 4k+2$, the sum is $(4k+3)(2k+2)$, so it is not ruled out, and each sum must be $(4k+3)(k+1)$.

if $n = 4k+3$, the sum is $(2k+2)(4k+5)$ which is also not ruled out, and each sum must be $(k+1)(4k+5)$.

Here are my solutions for the not impossible cases.

For the $n=4k+2$ case, the sum must be $(4k+3)(k+1) =(4k+4-1)(k+1) =4(k+1)^2-(k+1) =(2k+2)^2-(k+1) $. The square there suggests, to me, the formula for the sum of consecutive odd numbers $1+3+...+(2m-1)=m^2$, so $1+3+...+(4k+3) = (2k+2)^2$. If $k+1$ is odd, remove it from the sum so it is $(2k+2)^2-(k+1)$. If $k+1$ is even, both $1$ and $k$ are odd, so remove them from the sum. In either case, we have the desired partition.

For the $n=4k+3$ case, the sum must be $(4k+5)(k+1) =(4k+4+1)(k+1) =4(k+1)^2+(k+1) =(2k+2)^2+(k+1) $. Again, $1+3+...+(4k+3) = (2k+2)^2$. If $k+1$ is even, add it to the sum so it is $(2k+2)^2+(k+1)$. If $k+1$ is odd, $k+2$ is even, so remove $1$ and add $k+2$ to the sum. In either case, we have the desired partition.

I do not know how many partitions can be found.