What algorithm is used to compute a “bit that is two places to left of least significant bit in binary expansion of $n$” in the OEIS sequence A086483?

28 Views Asked by At

Let $Q$ denote the sequence A086483:

Bit that is two places to left of least significant bit in binary expansion of n.

For n = 4, 5, 6, 7, 8 the binary expansions are 100, 101, 110, 111, 1000 and the values of a(n) are respectively 0, 1, 0, 1, 0.

What algorithm is used to compute $Q$?

The sequence is $$0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, \ldots$$

I constructed a list of binary expansions of integers:

0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
...

But I cannot seem to understand which column allows to obtain $000001010010\ldots$

1

There are 1 best solutions below

2
On BEST ANSWER

That's confusingly worded, indeed. I believe it's the $\color{red}{bit}$ that is two places to the left of the least significant non-zero bit in the binary expansion of n.

$$ \color{darkgray}{ 0\,0\;\;0\,0\,0\,\color{red}{0} \\ 0\,0\;\;0\,\color{red}{0}\,0\,\color{black}{1} \\ 0\,0\;\;\color{red}{0}\,0\,\color{black}{1}\,0 \\ 0\,0\;\;0\,\color{red}{0}\,1\,\color{black}{1} \\ 0\,\color{red}{0}\;\;0\,\color{black}{1}\,0\,0 \\ 0\,0\;\;0\,\color{red}{1}\,0\,\color{black}{1} \\ 0\,0\;\;\color{red}{0}\,1\,\color{black}{1}\,0 \\ 0\,0\;\;0\,\color{red}{1}\,1\,\color{black}{1} \\ \color{red}{0}\,0\;\;\color{black}{1}\,0\,0\,0 \\ 0\,0\;\;1\,\color{red}{0}\,0\,\color{black}{1} \\ 0\,0\;\;\color{red}{1}\,0\,\color{black}{1}\,0 } $$