Processing math: 100%

Problem #161

Binary Play

Consider a set S(N) such that S(N) contains all sequences of 0 and 1 of length N in which no two 1's are adjacent. For example:

S(3) = (000,001,010,100,101)

Let A = No. of elements in S(30)

B = Sum of digits of A

You have to output no. of 0 appearing in B^{th} sequence of S(30) when arranged lexographically.

Contributed by Ankita Saxena

Solved by 343 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.