# What is the correct and conventional way to express the Dirichlet eta function as Dirichlet characters in Mathematica?

What is the correct and conventional way to express the Dirichlet eta function as Dirichlet characters in Mathematica?

Table[(2*DirichletCharacter[2, 1, n] - 1)/n^s, {n, 1, Infinity}]


or only the numerators as a finite sequence:

Table[(2*DirichletCharacter[2, 1, n] - 1), {n, 1, 12}]


{1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1}

https://en.wikipedia.org/wiki/Dirichlet_character#Modulus_2

I'm not sure if this is what you're looking for but it is easy to check in Mathematica that the infinite sum using DirichletCharacter[]

Sum[(2 DirichletCharacter[2, 1, n] - 1)/n^s, {n, 1, \[Infinity]}]

(* Out[38]= 2^-s (-2 + 2^s) Zeta[s] *)


is indeed DirichletEta[s]

% == DirichletEta[s] // FullSimplify

(* Out[37]= True *)

• Yes I see.I have another question about this though: math.stackexchange.com/questions/1895070/… – Mats Granvik Aug 17 '16 at 14:29
• But thanks for the effort. Not directly related either but I am seeking to apply the symmetric functional equation here: lmfdb.org/L/degree1 – Mats Granvik Aug 17 '16 at 14:31
• Another way to express the first relation: 2 DirichletL[2, 1, s] - DirichletL[1, 1, s] == DirichletEta[s] // FullSimplify. – J. M.'s torpor Aug 17 '16 at 17:08
• As to your first comment: why not check the validity of the two formulas in Mathematica, at least numerically? – Dr. Wolfgang Hintze Aug 18 '16 at 6:37