Print the Golfican sequence
The Golfican sequence is a sequence of integers, \$u\$, defined as follows:
- If \$n\$ is a power of \$2\$, then \$u_n=\log_2n+1\$.
- If \$n\$ in not a power of \$2\$, then \$u_n=u_p\$, where \$p\$ is the number of numbers from \$1\$ to \$n\$ inclusive which are not powers of \$2\$.
So, the first numbers in this sequence are \$1,2,1,3,2,1,3,4\$ and so on. Your job is to write a program which takes a number, \$x\$, as input, and outputs \$u_x\$. This is code-golf, so the shortest program in bytes wins.
I couldn't find a corresponding OEIS sequence for this. Thoughts?