Let $a(n)$ be [A103318][1], number of solutions $i$ in range $[0,n-1]$ to $i \equiv 0 \pmod {2^{n-i}}$: the sequence begins with
$$1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 3, 1, 2, 2, 2, 1, 2, 2, 3, 2$$

Also let's consider
$$\ell(n)=\left\lfloor\log_{2}(n)\right\rfloor$$
and
$$T(n,k)=\left\lfloor\frac{n}{2^k}\right\rfloor\operatorname{mod}2$$
Here $T(n,k)$ is the $(k+1)$-th bit from the right side in binary expansion of $n$.

Then we have an integer sequence given by
$$b(n)=\sum\limits_{k=0}^{\ell(n)}\sum\limits_{j=0}^{\ell(n)-k}2^{j}T(n-k,j+k)=\sum\limits_{k=0}^{\ell(n)}\left\lfloor\frac{n-k}{2^k}\right\rfloor$$
The sequence begins with
$$1, 2, 4, 5, 7, 9, 11, 12, 14, 16, 19, 20, 22, 24, 26, 27, 29, 31, 34, 36$$

I conjecture that $a(n)=b(n)-b(n-1)$ with $a(1)=1$.

Is there a way to prove it?

  [1]: https://oeis.org/A103318