Consider a sum $$\sum\_{k=0}^{n-1}\sum\_{j=0}^{m}A\_{j,m}(n-k)^jk^j$$
which returns an odd power $n^{2m+1}$ of $n$, for $\ m=0,1,2,...$ given fixed $A\_{0,m}, \ A\_{1,m}, \ ..., \ A\_{m,m}$. The coefficients $A\_{0,m}, \ A\_{1,m},....$ are solutions of system of equations (refer to [.txt-file](https://kolosovpetro.github.io/mathematica_codes/table_mathematica_m=1,12.txt) with mathematica codes for $m=1,2,...12$). Coefficients $A\_{0,m}, \ A\_{1,m},....$ are arranged to the [PDF-table](https://kolosovpetro.github.io/pdf/coefficients_of_polynomial.pdf). For example,
$$\sum\_{k=0}^{n-1}\sum\_{j=0}^{2}A\_{j,2}(n-k)^jk^j=\sum\_{k=0}^{n-1}30k^2(n-k)^2+1=n^5$$
Our coefficients are closely related to to coefficients $\beta\_{mv}$ from C. Jordan [Calculus of Finite Differences](https://oeis.org/A002457/a002457_1.pdf), pp. 448 - 450.


**Question**: Could the coefficients $A\_{0,m}, \ A\_{1,m}, \ ..., \ A\_{m,m}$ be reached in a recurrent way using $\beta\_{mv}$? This question also can be stated as: does there exist such a function $f(\beta\_{mv})=A\_{v,m}$?


**Additional Question** How exactly are our coefficients $A\_{0,m}, \ A\_{1,m}, \ ..., \ A\_{m,m}$ connected with $\beta\_{mv}$?



Coefficients in the sum $\sum_{k=0}^{n-1}\sum_{j=0}^{m}A_{j,m}(n-k)^jk^j=n^{2m+1}, \ m=1,2,....$
**EDIT 2018-04-16**: Formulae are corrected.


I'm not sure about connection with $\beta\_{mv}$, but we can obtain a recurrence formula for $A\_{j,m}$ as follows.


First let us fix the unused values $A\_{j,m}=0$ for $j<0$ or $j>m$, so we won't need to care about the summation range for $j$.


Expanding $(n-k)^j$ and using Faulhaber's formula, we get
$$\sum\_{k=0}^{n-1} (n-k)^j k^j = \sum\_{k=0}^{n-1} \sum\_i \binom{j}i n^{j-i} (-1)^i k^{i+j}$$ 
$$=\sum\_{i} \binom{j}{i} n^{j-i} \frac{(-1)^i}{i+j+1} \left[ \sum\_t \binom{i+j+1}t B\_t n^{i+j+1-t} - B\_{i+j+1}\right]$$
$$=\sum\_{i,t} \binom{j}{i} \frac{(-1)^i}{i+j+1} \binom{i+j+1}t B\_t n^{2j+1-t} - \sum\_{i} \binom{j}{i} \frac{(-1)^i}{i+j+1} B\_{i+j+1} n^{j-i}$$
where $B\_t$ are Bernoulli numbers.


Now, we notice that 
$$\sum\_{i} \binom{j}{i} \frac{(-1)^i}{i+j+1} \binom{i+j+1}t
=\begin{cases}
\frac{1}{(2j+1)\binom{2j}j}, & \text{if } t=0;\\
\frac{(-1)^j}{t}\binom{j}{2j-t+1}, & \text{if } t>0.
\end{cases}
$$
In particular, the last sum is zero for $0<t\leq j$.


Hence, introducing $\ell=2j+1-t$ and $\ell=j-i$, respectively, we get
$$\sum\_{k=0}^{n-1} (n-k)^j k^j
= \frac{1}{(2j+1)\binom{2j}j} n^{2j+1} + \sum\_{\ell} \frac{(-1)^j}{2j+1-\ell}\binom{j}{\ell}B\_{2j+1-\ell}n^{\ell} - \sum\_{\ell} \binom{j}{\ell} \frac{(-1)^{j-\ell}}{2j+1-\ell} B\_{2j+1-\ell}n^{\ell}$$
$$=\frac{1}{(2j+1)\binom{2j}j} n^{2j+1} + 2\sum\_{\text{odd }\ell} \frac{(-1)^j}{2j+1-\ell}\binom{j}{\ell}B\_{2j+1-\ell}n^{\ell}.$$


Using the definition of $A\_{j,m}$, we obtain the following identity for polynomials in $n$:
$$(\star)\qquad\sum\_{j} A\_{j,m} \frac{1}{(2j+1)\binom{2j}j}n^{2j+1} 
+ 2 \sum\_{j,\text{ odd }\ell} A\_{j,m} \binom{j}{\ell} \frac{(-1)^j}{2j+1-\ell} B\_{2j+1-\ell}n^{\ell} \equiv n^{2m+1}.$$




---


Taking the coefficient of $n^{2m+1}$ in $(\star)$, we get $A\_{m,m} = (2m+1) \binom{2m}{m},$
and taking the coefficient of $x^{2d+1}$ for an integer $d$ in the range $m/2 \leq d < m$, we get $A\_{d,m} = 0$.


Taking the coefficient of $n^{2d+1}$ in $(\star)$ for $m/4 \leq d < m/2$, we get 
$$A\_{d,m} \frac{1}{(2d+1)\binom{2d}{d}} + 2 (2m+1) \binom{2m}{m} \binom{m}{2d+1} \frac{(-1)^m}{2m-2d} B\_{2m-2d} = 0,$$
i.e.
$$A\_{d,m} = (-1)^{m-1} \frac{(2m+1)!}{d!d!m!(m-2d-1)!}\frac{1}{m-d} B\_{2m-2d}.$$


Continue similarly, we can express $A\_{d,m}$ for each integer $d$ in the range $m/2^{s+1}\leq d< m/2^s$ (iterating consecutively $s=1,2,\dots$) via previously determined values of $A\_{j,m}$ as follows:
$$A\_{d,m} = (2d+1)\binom{2d}{d} \sum\_{j\geq 2d+1} A\_{j,m} \binom{j}{2d+1} \frac{(-1)^{j-1}}{j-d} B\_{2j-2d}.$$
The same formula holds also for $d=0$.


