I have been thinking about a piece of code today, but I don't understand why I get different outputs from two in my mind similar Mathematical sums.
First I observe that the Table command for this:
Clear[n, s, a];
s = 1/2;
Table[Total[{1, -a, 1, -a,
1, -a}*{1, 1, -2*a, 1,
1, -2*a}/{(n + 0)^s, (n + 1)^s, (n + 2)^s, (n + 3)^s, (n + 4)^
s, (n + 5)^s}], {n, 1, 36, 6}]
and this:
Clear[n, s, a];
s = 1/2;
Table[Total[{1, -a, 1, -a,
1, -a}*{1, 1, -2*a, 1,
1, -2*a}/{(6*n + 1)^s, (6*n + 2)^s, (6*n + 3)^s, (6*n + 4)^
s, (6*n + 5)^s, (6*n + 6)^s}], {n, 0, 5}]
gives the same output starting:
$$\displaystyle \left\{1+\frac{1}{\sqrt{5}}-\frac{a}{2}-\frac{a}{\sqrt{2}}-\frac{2 a}{\sqrt{3}}+\sqrt{\frac{2}{3}} a^2,\frac{1}{\sqrt{7}}+\frac{1}{\sqrt{11}}-\frac{2 a}{3}-\frac{a}{2 \sqrt{2}}-\frac{a}{\sqrt{10}}+\frac{a^2}{\sqrt{3}},\frac{1}{\sqrt{13}}+\frac{1}{\sqrt{17}}-\frac{a}{4}-\frac{a}{\sqrt{14}}-\frac{2 a}{\sqrt{15}}+\frac{\sqrt{2} a^2}{3},\frac{1}{\sqrt{19}}+\frac{1}{\sqrt{23}}-\frac{a}{2 \sqrt{5}}-\frac{2 a}{\sqrt{21}}-\frac{a}{\sqrt{22}}+\frac{a^2}{\sqrt{6}},\frac{1}{5}+\frac{1}{\sqrt{29}}-\frac{2 a}{3 \sqrt{3}}-\frac{a}{2 \sqrt{7}}-\frac{a}{\sqrt{26}}+\sqrt{\frac{2}{15}} a^2,\frac{1}{\sqrt{31}}+\frac{1}{\sqrt{35}}-\frac{a}{4 \sqrt{2}}-\frac{2 a}{\sqrt{33}}-\frac{a}{\sqrt{34}}+\frac{a^2}{3}\right\}$$...
Then I did these two sums:
Clear[n, s, a];
s = 1/2;
Sum[Total[{1, -a, 1, -a,
1, -a}*{1, 1, -2*a, 1,
1, -2*a}/{(n + 0)^s, (n + 1)^s, (n + 2)^s, (n + 3)^s, (n + 4)^
s, (n + 5)^s}], {n, 1, Infinity, 6}]
Clear[n, s, a];
s = 1/2;
Sum[Total[{1, -a, 1, -a,
1, -a}*{1, 1, -2*a, 1,
1, -2*a}/{(6*n + 1)^s, (6*n + 2)^s, (6*n + 3)^s, (6*n + 4)^
s, (6*n + 5)^s, (6*n + 6)^s}], {n, 0, Infinity}]
which Mathematica 8 evaluates to:
$$\displaystyle \text{Sum}\left[\frac{1}{\sqrt{n}}-\frac{a}{\sqrt{1+n}}-\frac{2 a}{\sqrt{2+n}}-\frac{a}{\sqrt{3+n}}+\frac{1}{\sqrt{4+n}}+\frac{2 a^2}{\sqrt{5+n}},\{n,1,\infty ,6\}\right]$$
$$\displaystyle \sum _{n=0}^{\infty } \left(\frac{1}{\sqrt{1+6 n}}-\frac{a}{\sqrt{2+6 n}}-\frac{2 a}{\sqrt{3+6 n}}-\frac{a}{\sqrt{4+6 n}}+\frac{1}{\sqrt{5+6 n}}+\frac{2 a^2}{\sqrt{6+6 n}}\right)$$
respectively. So far I did not know if these sums are equivalent. Then I wanted to set these sums equal to zero and solve for $a$:
Clear[n, s, a];
s = 1/2;
Solve[Sum[
Total[{1, -a, 1, -a,
1, -a}*{1, 1, -2*a, 1,
1, -2*a}/{(n + 0)^s, (n + 1)^s, (n + 2)^s, (n + 3)^s, (n + 4)^
s, (n + 5)^s}], {n, 1, Infinity, 6}] == 0, a]
Clear[n, s, a];
s = 1/2;
Solve[Sum[
Total[{1, -a, 1, -a,
1, -a}*{1, 1, -2*a, 1,
1, -2*a}/{(6*n + 1)^s, (6*n + 2)^s, (6*n + 3)^s, (6*n + 4)^
s, (6*n + 5)^s, (6*n + 6)^s}], {n, 0, Infinity}] == 0, a]
which outputs:
$\left\{\left\{a\to \left(4 \sqrt{2} \text{HurwitzZeta}\left[\frac{1}{2},\infty \right]-4 \text{Zeta}\left[\frac{1}{2}\right]+2 \sqrt{2} \text{Zeta}\left[\frac{1}{2}\right]-\sqrt{2} \text{Zeta}\left[\frac{1}{2},\frac{1}{3}\right]-\sqrt{2} \text{Zeta}\left[\frac{1}{2},\frac{2}{3}\right]-\surd \left(\left(-4 \sqrt{2} \text{HurwitzZeta}\left[\frac{1}{2},\infty \right]+4 \text{Zeta}\left[\frac{1}{2}\right]-2 \sqrt{2} \text{Zeta}\left[\frac{1}{2}\right]+\sqrt{2} \text{Zeta}\left[\frac{1}{2},\frac{1}{3}\right]+\sqrt{2} \text{Zeta}\left[\frac{1}{2},\frac{2}{3}\right]\right)^2-4 \left(2 \sqrt{2} \text{HurwitzZeta}\left[\frac{1}{2},\infty \right]-2 \sqrt{2} \text{Zeta}\left[\frac{1}{2}\right]\right) \left(2 \sqrt{2} \text{HurwitzZeta}\left[\frac{1}{2},\infty \right]-\sqrt{2} \text{Zeta}\left[\frac{1}{2},\frac{1}{6}\right]-\sqrt{2} \text{Zeta}\left[\frac{1}{2},\frac{5}{6}\right]\right)\right)\right)/\left(2 \left(2 \sqrt{2} \text{HurwitzZeta}\left[\frac{1}{2},\infty \right]-2 \sqrt{2} \text{Zeta}\left[\frac{1}{2}\right]\right)\right)\right\},\left\{a\to \left(4 \sqrt{2} \text{HurwitzZeta}\left[\frac{1}{2},\infty \right]-4 \text{Zeta}\left[\frac{1}{2}\right]+2 \sqrt{2} \text{Zeta}\left[\frac{1}{2}\right]-\sqrt{2} \text{Zeta}\left[\frac{1}{2},\frac{1}{3}\right]-\sqrt{2} \text{Zeta}\left[\frac{1}{2},\frac{2}{3}\right]+\surd \left(\left(-4 \sqrt{2} \text{HurwitzZeta}\left[\frac{1}{2},\infty \right]+4 \text{Zeta}\left[\frac{1}{2}\right]-2 \sqrt{2} \text{Zeta}\left[\frac{1}{2}\right]+\sqrt{2} \text{Zeta}\left[\frac{1}{2},\frac{1}{3}\right]+\sqrt{2} \text{Zeta}\left[\frac{1}{2},\frac{2}{3}\right]\right)^2-4 \left(2 \sqrt{2} \text{HurwitzZeta}\left[\frac{1}{2},\infty \right]-2 \sqrt{2} \text{Zeta}\left[\frac{1}{2}\right]\right) \left(2 \sqrt{2} \text{HurwitzZeta}\left[\frac{1}{2},\infty \right]-\sqrt{2} \text{Zeta}\left[\frac{1}{2},\frac{1}{6}\right]-\sqrt{2} \text{Zeta}\left[\frac{1}{2},\frac{5}{6}\right]\right)\right)\right)/\left(2 \left(2 \sqrt{2} \text{HurwitzZeta}\left[\frac{1}{2},\infty \right]-2 \sqrt{2} \text{Zeta}\left[\frac{1}{2}\right]\right)\right)\right\}\right\}$
and the empty set:
$\{\}$
respectively.
For numerical reasons (setting infinity to a large number and evaluating) I believe that the complicated Zeta function expression is incorrect and that this is bug.
But I have a feeling though that the fault might have been made by me and not Mathematica. Where did I go wrong? Should the two sums give the same answer?