2阶
\[\sum_{i=l}^{r} \sum^{i}_{j=1} a_j \]\[=\sum_{i=l}^{r} (r-i+1) a_i \]\[=(r+1)\sum_{i=l}^{r} a_i+\sum_{i=l}^{r} i \cdot a_i \]这个很好理解,因为对于第 \(i\) 个数,他加了 \((r-i+1)\) 次
三阶
正常拆解
\[\sum_{i=l}^{r} \sum^{i}_{j=1} \sum_{k}^{j} a_k \]\[=\sum_{i=l}^{r} \sum_{j=1}^{i} (i-j+1) a_j \]\[=\sum_{i=l}^{r} {\Large (}i \cdot \sum_{j=1}^{i} a_j + \sum_{j=1}^{i} a_j - \sum_{j=1}^{i} j \cdot a_j{\Large )} \]\[=\sum_{i=l}^{r} i \cdot \sum_{j=1}^{i} a_j + \sum_{i=l}^{r} \sum_{j=1}^{i} a_j - \sum_{i=l}^{r} \sum_{j=1}^{i} j \cdot a_j \]注意到 \(\sum_{i=l}^{r} \sum_{j=1}^{i} a_j\) 看起来很眼熟,其余的 \(\sum\) 不过多乘了一个 \(i\) 或 \(j\) ,可得:
\[\sum_{i=l}^{r} i \cdot \sum_{j=1}^{i} a_j + \sum_{i=l}^{r} (r-i+1) a_j - \sum_{i=l}^{r} (r-i+1)() \cdot a_i \] 标签:他加,前缀,cdot,sum,Large,拆解 From: https://www.cnblogs.com/whrwlx/p/18287504