Problem

Source: Romanian TST 2002

Tags: modular arithmetic, floor function, combinatorics proposed, combinatorics



For any positive integer $n$, let $f(n)$ be the number of possible choices of signs $+\ \text{or}\ - $ in the algebraic expression $\pm 1\pm 2\ldots \pm n$, such that the obtained sum is zero. Show that $f(n)$ satisfies the following conditions: a) $f(n)=0$ for $n=1\pmod{4}$ or $n=2\pmod{4}$. b) $2^{\frac{n}{2}-1}\le f(n)\le 2^n-2^{\lfloor\frac{n}{2}\rfloor+1}$, for $n=0\pmod{4}$ or $n=3\pmod{4}$. Ioan Tomsecu