Problem 47073. Find the nth Fibbinary number

The numbers 0, 1, 2, 4, 5, 8, 9, and 10 form the first eight elements (i.e., elements a_0 to a_7) of the Fibbinary sequence. The name is a portmanteau that arose because of connections to Fibonacci numbers and binary numbers. The connection to Fibonacci numbers F(k)is that if the Zeckendorf expansion of n is
n = F(k_1) + F(k_2) + \ldots + F(k_m),
then
a_n = 2^{k_1-2}+2^{k_2-2}+\ldots+2^{k_m-2}
The connection to binary numbers is that the binary representations of the Fibbinary numbers have no adjacent 1s.
For example, = 10. The Zeckendorf expansion of 7 is 2+5, or F(3)+F(5), and
10=2^{3-2}+2^{5-2} = 2+8
Also, the binary expansion of 10 is 1010, which has no adjacent 1s.
Write a function to find the nth Fibbinary number.

Solution Stats

35.14% Correct | 64.86% Incorrect
Last Solution submitted on May 11, 2023

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers11

Suggested Problems

More from this Author275

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!