Compute the n-th term of a geometric sequence from first term, ratio and n.
输入首项 a₁、公比 r 与项数 n,求第 n 项。