For your second question:
Every positive integer $n$ can be written in the form $2^k(n)m(n)$, where $k(n)\ge 0$ and $m(n)$ is odd, and when you’ve done that, $m(n)$ is the greatest odd divisor of $n$. In particular, when $k(n)=0$, $n$ is odd, and $n$ itself is its own greatest odd divisor; when $k(n)=1$, $m(n) = n/2$ is odd and is the greatest odd divisor of $n$; and so on. Note that if $k(n)=i$, then $k(n+2^{i+1})=i$ as well: $$n+2^{i+1} = 2^im(n)+2^{i+1} = 2^i(m(n)+2)\;,$$ and $m(n)+2$ is odd, so $k(n+2^{i+1})=i$ and $m(n+2^{i+1})=m(n)+2$.
Use this idea to split $S$ into subsets $S_i$ for $i\ge 0$: let $$S_i = \{n\in S:k(n)=i\}.$$ Then $S_0 = \{2007,2009,\dots,4011\}$, the set of odd members of $S$; $S_1 = \{2006,2010, \dots,4010\}$, the set of even members of $S$ that are not multiples of $4$; $S_2 = \{2012,2020,\dots,4012\}$, the set of multiples of $4$ in $S$ that are not multiples of $8$; and so on. Each $S_i$ forms an arithmetic progression with constant difference $2^{i+1}$.
If $n \in S_0$, then $n$ is odd, and therefore $n$ itself will be one of the terms in the sum $K$. If $n\in S_1$, then $n/2$ is odd and will be one of the terms in the sum $K$. And so on: for each $i\ge 0$, if $n\in S_i$, then $n/2^i$ is odd and will be one of the terms in the sum $K$. This means that if $s_i$ is the sum of the members of $S_i$, then the members of $S_i$ contribute a total of $s_i/2^i$ to $K$. Thus, in order to find $K$ you need only find the sums $s_i$.
If $a_i$ is the smallest member of $S_i$ and $b_i$ is the largest, $$|S_i| = \frac{b_i-a_i}{2^{i+1}}+1;$$ this follows easily from the fact that $2^{i+1}$ is difference between consecutive members of $S_i$. Thus, $$s_i = \frac{a_i+b_i}{2}\left(\frac{b_i-a_i}{2^{i+1}}+1\right)$$ by the familiar formula for the sum of an arithmetic progression, and $$\frac{s_i}{2^i} = \frac{a_i+b_i}{2^{i+1}}\left(\frac{b_i-a_i}{2^{i+1}}+1\right).$$
Now, how far do you have to go? $2^{11} = 2048 \in S$, but $2^{12} = 4096 \notin S$, so $S_i=\varnothing$ if $i>11$. Thus, you need only find the largest and smallest members of $S_i$ for $0\le i\le 11$. This is still a bit tedious, but it is manageable by hand.