I have the following theorem written on my whiteboard, but have misplaced the reference. I believe the probabilistic method may be involved in the proof. Any pointers appreciated.
Theorem Let $v\in\{0,1\}^n$ be nonzero. Let $w=v_1+\ldots+v_n$$k=v_1+\ldots+v_n$ be its Hamming weight. Then there exists $i\leq j$ such that $$v_i+v_{i+1}+\cdots+v_j\geq \frac{1}{14}\frac{w}{(1+\log_2(n/w))},$$$$v_i+v_{i+1}+\cdots+v_j\geq \frac{1}{14}\frac{k}{(1+\log_2(n/k))},$$ and $$\min\{i-1,n-j\}\geq j-i,$$ for $n$ large enough. Note that this implies $$2i\geq j+1,\quad 2j\leq n-i$$ so that there is a locally dense interval not too near to the two ends of the vector.