420. What should two geometric progressions be so that the series formed by the sums of their corresponding terms is also a geometric progression? (Instead of the sum, what more general function can be taken here?)

将上面的文本翻译成英文，请保留源文本的换行和格式，直接输出翻译结果。
420. Let $a, a p, a p^{2} \ldots a p^{n}$ and $b, b q, b q^{2} \ldots b q^{n}$ be two given geometric progressions. If the sums of corresponding terms $a+b, a p+b q, a p^{2}+b q^{2} \ldots a p^{n}+b q^{n}$ are to form a geometric progression, then in particular, it must be $\frac{a p+b q}{a+b}=\frac{a p^{2}+b q^{2}}{a p+b q}$ or $a^{2} p^{2}+b^{2} q^{2}+a b\left(p^{2}+q^{2}\right)=a^{2} p^{2}+b^{2} q^{2}+$ $+2 a b p q$. After simplification, we get $a b\left(p^{2}+q^{2}\right)=2 a b p q$; we can divide this equality by $a b$ (we can assume that neither $a$ nor $b$ is zero: otherwise, all terms of at least one of the given progressions would be zero, the sum of the progressions would reduce to one progression, and the answer would be trivial), we get: $p^{2}+q^{2}=2 p q$ or $(p-q)^{2}=0$. Therefore, the ratios of both progressions must be equal. It is easy to prove that this necessary condition is sufficient.