Here, a = p, r = $"q"/"p"$

If $"q"/"p"$ < 1, then

Sn = $("a"(1 - "r"^"n"))/(1 - "r") = ("p"[1 - ("q"/"p")^"n"])/(1 - ("q"/"p")$

= $"p"^2/("p" - "q") [1 - ("q"/"p")^"n"]$

If $"q"/"p" > 1,$ then

Sn = $("a"("r"^"n" - 1))/("r" - 1) = ("p"[("q"/"p")^"n" - 1])/(("q"/"p") - 1)$

= $"p"^2/("q" - "p") [("q"/"p")^"n" - 1]$