What is the greatest value... The sum of the first three terms of a geometric progression is 21, and the sum of their squares is 1281. What is the greatest value can be the sum of the cubes?

Let $a,ar,ar^2$ be the three terms
So, $a+ar+ar^2=21$
So, $(a)^2+(ar)^2+(ar^2)^2=1281\implies a(r^2+r+1)a(r^2-r+1)=1281$
On division, $a-ar+ar^2=\frac{1281}{21}=61$
So, $ar=-20,a+ar^2=41$
$a^3+(ar)^3+(ar^2)^3=a^3+(ar^2)^3+(-20)^3$
$=(a+ar^2)^3-3a\cdot ar^2(a+ar^2)+(-20)^3$
$=(41)^3-3(-20)^2(41)+(-20)^3$
