Let the coefficients of (r+1)th,(r+2)th,(r+3)th be in the ratio 1:6:30
nCr nCr+1=16⇒r+1n−r=16⇒n−7r=6 ⋯(1)
nCr+1 nCr+2=630⇒r+2n−r−1=15⇒n−6r=11 ⋯(2)
Solving equations (1) and (2), we get
r=5 and n=41
Hence, the number of terms in the expansion is n+1=42