Solution of problem J590

Let p be a positive integer. Evaluate

S_{p} = ∑_{m=1}^{p} ∑_{n=1}^{m} ∑_{k=1}^{n} \frac{k^{2}}{2k^{2} − 2nk + n^{2}}

Proof Letting n − k = r the sum is

∑_{m=1}^{p} ∑_{n=1}^{m} ∑_{k=1}^{n} \frac{k^{2}}{k^{2} + (n − k)^{2}} = ∑_{m=1}^{p} ∑_{n=1}^{m} ∑_{r=0}^{n−1} \frac{(n − r)^{2}}{(n − r)^{2} + r^{2}}

that is

∑_{m=1}^{p} ∑_{n=1}^{m} ∑_{k=1}^{n−1} \frac{k^{2}}{k^{2} + (n − k)^{2}} + ∑_{m=1}^{p} ∑_{n=1}^{m} 1 =

= ∑_{m=1}^{p} ∑_{n=1}^{m} 1 + ∑_{m=1}^{p} ∑_{n=1}^{m} ∑_{r=1}^{n−1} \frac{(n − r)^{2}}{(n − r)^{2} + r^{2}}

thus

∑_{m=1}^{p} ∑_{n=1}^{m} ∑_{k=1}^{n−1} \frac{k^{2}}{k^{2} + (n − k)^{2}} = \frac{1}{2} [∑_{m=1}^{p} ∑_{n=1}^{m} ∑_{k=1}^{n−1} \frac{k^{2}}{k^{2} + (n − k)^{2}} + ∑_{m=1}^{p} ∑_{n=1}^{m} ∑_{k=1}^{n−1} \frac{(n − k)^{2}}{k + (n − k)^{2}} ] =

= \frac{1}{2} ∑_{m=1}^{p} ∑_{n=1}^{m} ∑_{k=1}^{n−1} ·1

and then

∑_{m=1}^{p} ∑_{n=1}^{m} ∑_{k=1}^{n} \frac{k^{2}}{k^{2} + (n − k)^{2}} = \frac{1}{2} ∑_{m=1}^{p} ∑_{n=1}^{m} ∑_{k=1}^{n−1} ·1 + ∑_{m=1}^{p} ∑_{n=1}^{m} ·1 = \frac{p(p^{2} − 1)}{12} + \frac{p(p + 1)}{2} =

= \frac{p(p + 5)(p + 1)}{15}