The problem is the following. I would like to find a simple algorithm or principle of classification of numbers regarding their presentation in binary form.
Let's consider an example. The numbers by 4-digit binary numbers are following:
$0000_2=0$
$0001_2=1$
$0010_2=2$
$\vdots $
$1111_2=15$
I need to divide the set {0,1,...,15} into subsets, each member of which can be presented by certain numbers of binary ones in binary representation.
I.e.
$C_0=\{0\}$ ($0$ binary ones)
$C_1=\{1, 2, 4, 8\}$ (1 binary one: $0001_2$, $0010_2$, $0100_2$, $1000_2$)
$C_2= \{3, 5, 6, 9, 10, 12\}$ (2 binary ones)
$\vdots $
$C_5=\{ 15 \}$
Does there exist a result from the number theory allowing to reveal these subsets without transition to binary representation?
The number of ones in the binary representation of $n$ is the greatest integer $r$ such that $2^r$ divides $$\binom{2n}n$$
See https://oeis.org/A000120
It is not too hard (but not too simple, either) to prove this by induction.