How to calculate the dislocation subtraction method in the proportional sequence? I don't quite understand this algebra

How to calculate the dislocation subtraction method in the proportional sequence? I don't quite understand this algebra

Cn=a1+ a1q+ a1q^2+ a1q^3+ … +a1q^n ……… .(1)qCn=a1q+ a1q^2+ a1q^3+ a1q^4… +a1q^n+ a1q^(n+1) …… (2) (1) - (2) we obtain that when (1-Q) CN = a1-a1q ^ (n + 1) q is not equal to 1, CN = A1 [1-Q ^ (n + 1)] / (1-Q) q = 1, CN = n A1