This is a sum from example exercises I might get on my entrance exam - and I've no idea how to solve it! You're supposed to rearrange the terms in terms of n.

I can take the (q-1) to the left, take the q^n to the right, take r to the left as well... and that's when the problems begin.

I know logs are involved in it somehow...

Should I completely ignore the little 0 next to the R? Mathematically speaking, are R and r different variables?