We should accept the G.P. to be \[a,~ar,~a{{r}^{2}},~a{{r}^{3}},\text{ }\ldots \]
Then, at that point, as per the inquiry, we have
\[\begin{array}{*{35}{l}}
a~+~ar~+~a{{r}^{2}}~=\text{ }16\text{ }and~a{{r}^{3~}}+~a{{r}^{4}}~+~a{{r}^{5~}}=\text{ }128 \\
a~\left( 1\text{ }+~r~+~{{r}^{2}} \right)\text{ }=\text{ }16\text{ }\ldots \text{ }\left( 1 \right)\text{ }and, \\
a{{r}^{3}}\left( 1\text{ }+~r~+~{{r}^{2}} \right)\text{ }=\text{ }128\text{ }\ldots \text{ }\left( 2 \right) \\
\end{array}\]
Separating condition\[\left( 2 \right)\text{ }by\text{ }\left( 1 \right)\], we get
\[\begin{array}{*{35}{l}}
{{r}^{3}}~=\text{ }8 \\
r\text{ }=\text{ }2 \\
\end{array}\]
Presently, utilizing\[r\text{ }=\text{ }2\text{ }in\text{ }\left( 1 \right)\], we get
\[\begin{array}{*{35}{l}}
a\text{ }\left( 1\text{ }+\text{ }2\text{ }+\text{ }4 \right)\text{ }=\text{ }16 \\
a\text{ }\left( 7 \right)\text{ }=\text{ }16 \\
a\text{ }=\text{ }16/7 \\
\end{array}\]
Presently, the amount of terms is given as