So, the difference between 2 and 3 is the negative sign on the a_k coefficients. These definitions for a_k are different with one definition being the negative of the other definition. You can't say one is correct and the other is wrong. You can only decide on which definition you prefer, and once you decide, don't change definitions later. I just opened up one of my books which uses your definition #2. I can't recall if all books use this definition, but I believe this is the most common form. But, just be careful to check the definition used in your reference.