My first version of this was a little hasty. See edit.​m  0 :
4
π
45
​​--- edit ---​m ≠ 0 :
(2(-9+
2
m
2
π
))/(3
4
m
)
​​--- end edit ---​Here’s how I thought about it.We’d like to symbolically compute
In[]:=
S=
∞
∑
n=-∞
1
2
n
2
(n-m)
for m ∈

and observing the constraints n ≠ 0 and n ≠ m.
The first constraint can be met by
In[]:=
S=
-1
∑
n=-∞
1
2
n
2
(n-m)
+
∞
∑
n=1
1
2
n
2
(n-m)
which is equivalent to
S=
∞
∑
n=1
1
2
n
2
(-n-m)
+
∞
∑
n=1
1
2
n
2
(n-m)
and the slightly simpler
S=
∞
∑
n=1
1
2
n
2
(n+m)
+
∞
∑
n=1
1
2
n
2
(n-m)
with the constraint n ≠ m.
​
For the trivial case of m  0:
In[]:=
S0=2*
∞
∑
n=1
1
4
n
Out[]=
4
π
45
​
For m < 0 and n ≠ m:
S1=
∞
∑
n=1
1
2
n
2
(n-Abs[m])
+
∞
∑
n=1
1
2
n
2
(n-m)
which for m < 0 is the sum
S1=
Abs[m]-1
∑
n=1
1
2
n
2
(n+m)
+
∞
∑
n=Abs[m]+1
1
2
n
2
(n+m)
+
∞
∑
n=1
1
2
n
2
(n-m)
or
S1=
-1-m
∑
n=1
1
2
n
2
(n+m)
+
∞
∑
n=1-m
1
2
n
2
(n+m)
+
∞
∑
n=1
1
2
n
2
(n-m)
But notice that the first term will fail if m-1. So we must further constrain m: m<-1
In[]:=
S1=Assuming(m∈)∧(m<-1),
-1-m
∑
n=1
1
2
n
2
(n+m)
+
∞
∑
n=1-m
1
2
n
2
(n+m)
+
∞
∑
n=1
1
2
n
2
(n-m)
//FullSimplify
Out[]=
2(-9+
2
m
2
π
)
3
4
m
and for m-1:
In[]:=
S1a=
∞
∑
n=2
1
2
n
2
(n-1)
+
∞
∑
n=1
1
2
n
2
(n+1)
//FullSimplify
Out[]=
2
3
(-9+
2
π
)
​
Now for m > 0:
S2=
∞
∑
n=1
1
2
n
2
(n+m)
+
∞
∑
n=1
1
2
n
2
(n-m)
which for m > 0 is the sum
In[]:=
S2=
∞
∑
n=1
1
2
n
2
(n+m)
+
m-1
∑
n=1
1
2
n
2
(n-m)
+
∞
∑
n=m+1
1
2
n
2
(n-m)
which also must have m > 1.
In[]:=
S2=Assuming(m>1)∧(m∈),
∞
∑
n=1
1
2
n
2
(n+m)
+
m-1
∑
n=1
1
2
n
2
(n-m)
+
∞
∑
n=m+1
1
2
n
2
(n-m)
//FullSimplify
Out[]=
2(-9+
2
m
2
π
)
3
4
m
and for m1:
In[]:=
S2a=
∞
∑
n=1
1
2
n
2
(n+1)
+
∞
∑
n=2
1
2
n
2
(n-1)
//FullSimplify
Out[]=
2
3
(-9+
2
π
)