You have the wrong type of summation operator. You need the one that looks like the summation in the first image, with placeholders top and bottom (you can get it with Ctrl Shft 4).
Hey Alan, thank you for your help, it looks great. One last question so would I have to change the value of N or little n? And is there a way to place the 3rd,5th,7th, etc. harmonic of the waves on the same graph or I can only do that separately?