Let an denote the number of all n‑digit positive integers formed by the digits 0, 1 or both such that no consecutive digits in them are 0. Let bn = the number of such n‑digit integers ending with digit 1 and
cn = the number of such n‑digit integers ending with digit 0.
Know your College Admission Chances Based on your Rank/Percentile, Category and Home State.
Get your JEE Main Personalised Report with Top Predicted Colleges in JoSA
Which of the following is correct?
an = numbers of all n digit positive integers formed by the digits 0, 1 or both such that no consecutive digits in them are zero.
the number will end with 0 or 1
Case-I: If the number ends with 0, then
(n – 1)th digit should be 1
Hence number of such numbers will be bn – 1.

Case-II: If the number ends with 1, then
First (n – 1) digits should be (n – 1) digit positive integers formed by
the digits 0, 1 or both such that no consecutive digits in them are zero.
Hence number of such numbers will be an – 1.

an = an – 1 + bn – 1 .......(1)
but bn is the number of such numbers which will end with 1
first (n – 1) digits will be (n – 1) digit positive integers formed by
the digits 0, 1 or both such that no consecutive digits in them are zero.
Hence bn = an – 1
From (1), we get
an = an – 1 + an – 2 and for n = 17, a17 = a16 + a15
cn is the number of such numbers ending with 0.
(n – 1)th digit should be 1.
first (n – 1) digits will be (n – 1) digit positive integers formed by
the digits 0, 1 or both such that no consecutive digits in them are zero
which will end with 1.
cn = bn – 1.
The value of b6 is
b6 = a5 = a4 + a3 = 2a3 + a2 = 3a2 + 2a1
a2 = 2 (10 and 11)
a1 = 1 (1)
b6 = 8