Define the sequence as the number of adjacent pairs of ones in the binary expansion of (possibly overlapping).
E.g.: , , .
Define the sequence .
This sequence is called the Rudin-Shapiro sequence.
Also consider the summatory sequence of : .
The first couple of values of these sequences are:
The sequence has the remarkable property that all elements are positive and every positive integer occurs exactly times.
Define , with , as the index in for which occurs for the 'th time in .
E.g.: , and .
Let be the Fibonacci sequence defined by:
and
for .
Define .
Find for .