I'm working on a function $\zeta(\xi)$ that takes as input an integer $\xi$ (in base $10$) and calculates how many $1$'s there are in its binary representation. How can I write such function?
Here is a graph of $\zeta(\xi)$, for $0\leq\xi\leq250$, created in Excel:
By now, I have tried only brute-forcing: calculate a lot of values of $\zeta(\xi)$ to try to find a common pattern, but this doesn't seem helpful in finding an explicit formula. Any idea?