Nth term of a geometric sequence