nth term of gp