Finding the average power dissipated in a resistor
Your approach and the suggest answer are awfully complex for a circuit with one singular load impedance \$Z=R + jx\$.

As this is homework, I can only guide you how I would approach this problem if I only had a pad of paper available (no Spice or Matlab).


Find the RMS value of each voltage source as a function of n.
Exploit super-position and write of the apparent power as a function of each voltage source (you will sum them together at the end).
The apparent power of the circuit is \$V_{rms}^2/Z\$.
Write out the load impedance as a function of n, \$Z = R + j\omega L\$, where \$ \omega = 200 \pi n\$.
Normalize the apparent power (divide top/bottom by complex conjugate of the denominator).
Power dissipated by the resistor is the real power. Leave the imaginary power out for recycling. 
Complete the summation of the real power due to each voltage source.