Find the sum of the first n terms of the following sequence.

(Not too hard, yet relatively nice to work out)

PlanckTime - Amin

I found nothing about this relatively nice. How did you do it? Mine looks horrible.

That one guy that's always on

How I did it was take Re(e^{inx}) = cos(nx), so that ∑3^{a - 1}cos(ax) = Re(∑3^{a - 1}e^{iax}). This is then a geometric series with the inital value of e^{ix} and r = 3 e^{ix}. This gives S_{n} = Re(e^{ix}(1 - 3^{n}e^{inx})/(1 - 3e^{ix})). This is a huge headache to spimlify and get an answer. Is there a better way to do this?

This is how I did it, and it isn't too bad to simplify if you multiply the denominator of your sum by (1-3*exp(-ix))

That's what I did, but it left a nasty expression in the denominator.

Here's my solution, I don't think its too ugly!

PlanckTime - Amin

Yup, I agree with this