The correct option is B 34
No two 2′s should be consecutive.
Case 1: No 2′s occur.
Count of such number =1
Case 2: Only one 2′s occurs.
Count of such number =7C1=7
Case 3: Two 2′s occur.
x1––– 2– x2––– 2– x3–––
Arrangement can be done in this way, where x1≥0,x2≥1,x3≥0
and x1+x2+x3=5
Putting x′2=x2−1 so that x′2≥0
x1+x′2+x3=4
Number of solutions =4+3−1C3−1=6C2=15
Case 4: Three 2′s occur.
x1––– 2– x2––– 2– x3––– 2– x4–––
x1+x2+x3+x4=4
⇒x1+x′2+x′3+x4=2
Number of solutions =2+4−1C4−1=5C3=10
Case 4: Five 2′s occur.
Count of such number =1
Hence, total count =1+7+15+10+1=34