# Tricky sums indeed!

Let the function $$\Theta (n)$$ denote the sum of all natural numbers less than or equal to $$n$$. However, this function has one trick - if the number to be added $$i$$ is a power of 2 (i.e $${ 2 }^{ x } \equiv i$$), then instead of adding, we subtract the number.

What is $$\displaystyle \sum _{ i=4 }^{ 10000 }{ \quad \Theta (i) }$$?

As an explicit example, $$\Theta (4) = -4$$.

×