(1+2x2+x4)(1+nC1x+nC2x2+nC3x3+...)=(a0+a1x+a2x2+a3x3+...)(1+nC1x+(2+nC2)x2+(nC3+2nC1)x3+...)=(a0+a1x+a2x2+a3x3+...)
Hence,
a1=nC1,a2=2+nC2,a3=nC3+2nC1
Given, a1,a2,a3 are in AP, implies 2a2=a1+a3
Putting values of a1,a2,a3 we get
2(2+nC2)=nC1+nC3+2nC14+2nC2=3nC1+nC3nC3+3nC1−2nC2−4=0n(n−1)(n−2)6+3n−2n(n−1)2−4=0n3−9n2+26n−24=0n3−4n2−5n2+20n+6n−24=0n2(n−4)−5n(n−4)+6(n−4)=0(n−4)(n2−5n+6)=0(n−4)(n2−3n−2n+6)=0(n−4)(n−3)(n−2)=0n=4,3,2
n can not be 2 as nC3 wil not be valid,
Hence, n=4,3