Wouldn’t be the answer: pow(2,N) - 1
Count Binary Strings of length N which has no consecutive ones
1 1 1, 0 0 0, 1 0 0, 0 1 0, 0 0 1, 1 1 0, 1 0 1, 0 1 1 excluding first one.
000 //ok
001 //ok
010 //ok
011 //not ok
100 //ok
101 //ok
110 //not ok
111 //not ok
As you can see here, the count is 5.
Thank you very much, Ishita .