A string of N binary bits has the property that every bit is adjacent to a '1' bit. An example for N=12 is 111011011110.
Note that 010 is not a valid sequence, the 1 bit is not adjacent to any other 1 bit.
How many valid binary sequences of length 20 exist?
What is the smallest length N such that there are over a hundred thousand valid binary sequences?
Call the sequence A.
The even numbered terms of A are the squares of Fibonacci numbers. Specifically term A(2n)=F(n+1)^2.
The odd numbered terms are one more than the product of the square roots of the terms preceding and following.
A(2n-1)=sqrt(A(2n)*A(2n+2))+1
=F(n+1)*F(n+2)+1
The recurrence relation given by OEIS (I'll prove it if I have time)
A(n)=A(n-1)+A(n-3)+A(n-4)
|
Posted by Jer
on 2022-11-15 12:45:37 |