Is there an equation that reflects how many values have a bit in position $i$ turned on for a list of values $0-N$?.
For example if $N=5$, our numbers are represented in binary as:
000,
001,
010,
011,
100,
101,
So in position 0 (least significant bit), there are 3 bits turned on, in position 1 there are 2 bits turned on, and in position 3 there are 2 bits turned on. Is there an equation that relates this for any position $i$ and value $N$?