Expansion of the Shape of Numbers
Abstract: This article extends the concept of the shape of numbers. Originally, a shape was defined as [1, K1, K2, ···], 1Ki+1 are allowed, which prove that they can be calculated with the similar form (T0+K0)(T1+K1)(T2+K2) ···. In this way, a lot of calculation formulas can be obtained. At the end, the form is obtained to calculate K1x···xKM+(L+K1)x···x(L+KM)+(2L+K1)x···x(2L+KM)+(3L+K1)x···x(3L+KM)+···. 1. Introduction

Peng, J. has introduced Shape of numbers in   :

$\left({I}_{1},{I}_{2},\cdots ,{I}_{M}\right)$, ${I}_{i}\in N$, ${I}_{1}<{I}_{2}<\cdots <{I}_{M}$. There are M − 1 intervals between adjacent numbers. ${I}_{i+1}-{I}_{i}=1$ means continuity, ${I}_{i+1}-{I}_{i}>1$ means discontinuity.

Shape of numbers: collect $\left({I}_{1},{I}_{2},\cdots ,{I}_{M}\right)$ with the same continuity and discontinuity at the same position into a catalog, call it a Shape.

A shape has a min Item: $\left(1,{K}_{1},{K}_{2},\dots \right)$ that use the symbol PS = [min Item] to represent it.

If ${K}_{i+1}-{K}_{i}=D>1$, only ${I}_{i+1}-{I}_{i}\ge D$ is allowed. If ${K}_{i+1}-{K}_{i}=1$, only ${I}_{i+1}-{I}_{i}=1$ is allowed.

The single $\left({I}_{1},{I}_{2},\cdots ,{I}_{M}\right)$ is an item, ${I}_{1}×{I}_{2}×\cdots ×{I}_{M}$ is the product. Ii is a factor.

Example:

$PS=\left[1,2\right]\to \left(1,2\right),\left(2,3\right),\left(3,4\right),\left(1000,1001\right)\in PS$

$PS=\left[1,3\right]\to \left(1,3\right),\left(1,4\right),\left(2,4\right),\left(1,5\right),\left(2,5\right),\left(3,5\right),\left(1000,2001\right)\in PS$

$PS=\left[1,4\right]\to \left(1,4\right),\left(1,5\right),\left(2,5\right),\left(1,6\right),\left(2,6\right),\left(3,6\right)\in PS$, $\left(3,5\right),\left(4,6\right)\notin PS$

$PS=\left[1,4,6\right]\to \left(1,4,7\right),\left(1,5,7\right),\left(2,5,7\right)\in PS$, $\left(3,5,7\right)\notin PS$

Define:

SET(N, PS) = set of items belonging to PS in [1, N − 1]

PM(PS) = count of factors

PB(PS) = count of discontinuities

MIN(PS) = min product: $MIN\left(\left[1,2,3\right]\right)=1×2×3$, $MIN\left(\left[1,2,4\right]\right)=1×2×4$

IDX(PS) = (max factor) + 1

PH(PS) = IDX(PS) − PB(PS) − 2

Basic Shape: intervals = 1 or 2

BASE(PS) = BS: if (1) PB(BS) = PB(PS), (2) PM(BS) = PM(PS), (3) BS is a Basic Shape, (4) BS has discontinuity intervals at the same positions of PS.

Example:

$PS=\left[1,2\right]\to BASE\left(PS\right)=\left[1,2\right]$

$PS=\left[1,3\right],\left[1,4\right],\left[1,K>2\right]\to BASE\left(PS\right)=\left[1,3\right]$

$PS=\left[1,3,4\right],\left[1,4,5\right],\left[1,K>2,X=K+1\right]\to BASE\left(PS\right)=\left[1,3,4\right]$

$PS=\left[1,3,5\right],\left[1,4,9\right],\left[1,K>2,X>K+1\right]\to BASE\left(PS\right)=\left[1,3,5\right]$

End(N, PS) = set of items belonging to PS with the max factor = N − 1;

|SET(N, PS)| = count of items in SET(N, PS);

Example:

$SUM\left(6,\left[1,2,4\right]\right)=1×2×4+1×2×5+2×3×5$

$SUM\left(9,\left[1,4,7\right]\right)=1×4×7+1×4×8+1×5×8+2×5×8$

 introduced the subset:

If PB(PS) = 0, SET(N, PS) is simple.

If PB(PS) > 0, then can fix some interval of discontinuities to get subsets.

SET(N, PS, PT) = subset of SET(N, PS), a valid

$PT=\left[1,{T}_{1},\cdots ,{T}_{M}\right]=\left\{\begin{array}{l}{T}_{i+1}-{T}_{i}=1:{K}_{i+1}-{K}_{i}=1,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\text{means}\text{\hspace{0.17em}}{I}_{i+1}-{I}_{i}=1\\ {T}_{i+1}-{T}_{i}=1:{K}_{i+1}-{K}_{i}=D>1,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\text{means}\text{\hspace{0.17em}}{I}_{i+1}-{I}_{i}=D\\ {T}_{i+1}-{T}_{i}=2:{K}_{i+1}-{K}_{i}=D>1,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{means}\text{\hspace{0.17em}}{I}_{i+1}-{I}_{i}\ge D\end{array}$ (*)

PT only has the change at (*), when a change happens, make the interval fixed.

PCHG(PS, PT) = count of change from BASE(PS) to PT

Example:

$PCHG\left(\left[1,3,5\right],\left[1,3,5\right]\right)=0$

$PCHG\left(\left[1,3,5\right],\left[1,2,4\right]\right)=PCHG\left(\left[1,4,7\right],\left[1,2,4\right]\right)=1$, changed at T1

$PCHG\left(\left[1,3,5\right],\left[1,3,4\right]\right)=PCHG\left(\left[1,4,7\right],\left[1,3,4\right]\right)=1$, changed at T2

$PCHG\left(\left[1,3,5\right],\left[1,2,3\right]\right)=PCHG\left(\left[1,8,10\right],\left[1,2,3\right]\right)=2$, changed at T1, T2

SUM_SUBSET(N, PS, PT) is defined in  = sum of all products in SET(N, PS, PT)

Now, SUM() and SUM_SUBSET() are uniformly defined as SUM(N, PS, PT), SUM(N, PS, BASE(PS)) is abbreviated as SUM(N, PS)

Only valid PT is discussed below.

   came to the following conclusion:

(1.1) $|SET\left(N,PS,PT\right)|=\left(\begin{array}{c}N-PH\left(PS\right)-PCHG\left(PS,PT\right)-1\\ PB\left(PT\right)+1\end{array}\right)$

(1.2) $SUM\left(N,PS\right)=MIN\left(PS\right)\left(\begin{array}{c}N\\ IDX\left(PS\right)\end{array}\right)$, PS is a Basic Shape

The following uses count of $X\in K$ for count of

$\left\{{X}_{1},{X}_{2},\cdots ,{X}_{M}\right\}\in \left\{{K}_{1},{K}_{2},\cdots ,{K}_{M}\right\}$

(1.3) $PS=\left[1,{K}_{1},\cdots ,{K}_{M}\right]$, $PT=\left[1,{T}_{1},{T}_{2},\cdots ,{T}_{M}\right]$

Use the form $\left({T}_{1}+{K}_{1}\right)\left({T}_{2}+{K}_{2}\right)\cdots \left({T}_{M}+{K}_{M}\right)=\sum {X}_{1}{X}_{2}\cdots {X}_{M}$, Xi = Ti or Ki.

The expansion has 2M items, don’t swap the factors of ${X}_{1}{X}_{2}\cdots {X}_{M}$, then each ${X}_{1}{X}_{2}\cdots {X}_{M}$ corresponds to one expression =

${A}_{q}\left(\begin{array}{c}N-PH\left(PS\right)-PCHG\left(PS,PT\right)\\ IDX\left(PT\right)-q\end{array}\right)$

$q=\text{countof}\text{\hspace{0.17em}}X\in K$.

$SUM\left(N,PS,PT\right)=\sum {A}_{q}\left(\begin{array}{c}N-PH\left(PS\right)-PCHG\left(PS,PT\right)\\ IDX\left(PT\right)-q\end{array}\right)$.

${A}_{q}={\prod }_{i=1}^{M}\left({X}_{i}+{D}_{i}\right)$, ${D}_{i}=\left\{\begin{array}{l}-m:{X}_{i}={T}_{i},m=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{1},\cdots ,{X}_{i-1}\right\}\in K\\ +m:{X}_{i}={K}_{i},m=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{1},\cdots ,{X}_{i-1}\right\}\in T\end{array}$

Example:

$PS=\left[1,{K}_{1}\ge 3,{K}_{2}\ge {K}_{1}+2,{K}_{3}\ge {K}_{2}+2\right]$,

$BS=BASE\left(PS\right)=\left[1,3,5,7\right]$,

$IDX\left(BS\right)=8$

$\begin{array}{c}\text{Theform}=\left(3+{K}_{1}\right)\left(5+{K}_{2}\right)\left(7+{K}_{3}\right)\\ =3×5×7+3×5×{K}_{3}+3×{K}_{2}×7+3×{K}_{2}×{K}_{3}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+{K}_{1}×5×7+{K}_{1}×5×{K}_{3}+{K}_{1}×{K}_{2}×7+{K}_{1}×{K}_{2}×{K}_{3}\end{array}$

$\begin{array}{c}P=N-PH\left(PS\right)-PCHG\left(PS,PT\right)\\ =N-\left\{IDX\left(PS\right)-PB\left(PS\right)-2\right\}-0\\ =N-\left\{{K}_{3}+1-3-2\right\}=N-{K}_{3}+4\end{array}$

à

$\begin{array}{l}SUM\left(N,PS\right)=3×5×7\left(\begin{array}{c}P\\ 8\end{array}\right)+3×5×\left({K}_{3}+2\right)\left(\begin{array}{c}P\\ 7\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}+3×\left({K}_{2}+1\right)×\left(7-1\right)\left(\begin{array}{c}P\\ 7\end{array}\right)+3×\left({K}_{2}+1\right)×\left({K}_{3}+1\right)\left(\begin{array}{c}P\\ 6\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}+{K}_{1}×\left(5-1\right)×\left(7-1\right)\left(\begin{array}{c}P\\ 7\end{array}\right)+{K}_{1}×\left(5-1\right)×\left({K}_{3}+1\right)\left(\begin{array}{c}P\\ 6\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}+{K}_{1}×\text{}{K}_{2}×\left(7-2\right)\left(\begin{array}{c}P\\ 6\end{array}\right)+{K}_{1}×{K}_{2}×{K}_{3}\left( P 5 \right)\end{array}$

$\text{Anitem}\in PS=\left\{\text{begin},{K}_{1}+{E}_{1},\cdots ,{K}_{M}+{E}_{M}\right\}$, K is fixed, E is variable.

$\text{Aproduct}=\text{begin}×\left({K}_{1}+{E}_{1}\right)\cdots \left({K}_{M}+{E}_{M}\right)=\text{begin}×\sum {F}_{1}{F}_{2}\cdots {F}_{M}$, Fi = Ei or Ki

That is, a product can be broken down into 2M parts.

Define $SUM\text{_}K\left(N,PS,PT,PF={F}_{1}{F}_{2}\cdots {F}_{M}\right)$ = Sum of one part in SUM(N, PS).

PF indicates the part. Fi = Ei or Ki

$\begin{array}{c}SUM\left(N,PS,PT\right)=\sum \text{product}=\sum \sum \text{begin}×{F}_{1}\cdots {F}_{M}\\ =\sum {\prod }_{i=1}^{M}\left({X}_{i}+{D}_{i}\right)\left(\begin{array}{c}A\\ {M}_{q}\end{array}\right)\end{array}$

${X}_{i}+{D}_{i}=\left\{\begin{array}{l}\left\{{T}_{i}-{D}_{i}\right\}:{X}_{i}={T}_{i},{D}_{i}=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{1},\cdots ,{X}_{i-1}\right\}\in K\\ \left\{{K}_{i}\right\}+\left\{{D}_{i}\right\}:{X}_{i}={K}_{i},{D}_{i}=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{1},\cdots ,{X}_{i-1}\right\}\in T\end{array}$

Expand SUM(N, PS, PT) by {braces}:

(1.4) SUM_K(N, PS, PT, PF) = ∑Expansion of SUM() with same

$\left\{{K}_{i}\right\}\in PF=\sum {\prod }_{i=1}^{M}{Y}_{i}\left(\begin{array}{c}A\\ {M}_{q}\end{array}\right)$,

${Y}_{i}=\left\{\begin{array}{l}0:{F}_{i}={K}_{i},{X}_{i}={T}_{i}\\ {K}_{i}:{F}_{i}={K}_{i},{X}_{i}={K}_{i}\\ {T}_{i}-{D}_{i}:{F}_{i}={E}_{i},{X}_{i}={T}_{i},{D}_{i}=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{1},\cdots ,{X}_{i-1}\right\}\in K\\ {D}_{i}:{F}_{i}={E}_{i},{X}_{i}={K}_{i},{D}_{i}=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{1},\cdots ,{X}_{i-1}\right\}\in T\end{array}$

Example:

$SUM\left(N,\left[1,{K}_{1}\ge 3,{K}_{2}\ge {K}_{1}+2\right]\right)$,

$\text{form}=\left(3+{K}_{1}\right)\left(5+{K}_{2}\right)$ à

$\begin{array}{l}=15\left(\begin{array}{c}N-{K}_{2}+3\\ 6\end{array}\right)+3\left(\left\{{K}_{2}\right\}+\left\{1\right\}\right)\left(\begin{array}{c}N-{K}_{2}+3\\ 5\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\text{ }+{K}_{1}\left(\left\{5-1\right\}\right)\left(\begin{array}{c}N-{K}_{2}+3\\ 5\end{array}\right)+{K}_{1}{K}_{2}\left(\begin{array}{c}N-{K}_{2}+3\\ 4\end{array}\right)\end{array}$

Expand by the {braces}:

$\begin{array}{l}=\left\{15\left(\begin{array}{c}N-{K}_{2}+3\\ 6\end{array}\right)+3\left(\begin{array}{c}N-{K}_{2}+3\\ 5\end{array}\right)\right\}+3{K}_{2}\left(\begin{array}{c}N-{K}_{2}+3\\ 5\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\text{ }+4{K}_{1}\left(\begin{array}{c}N-{K}_{2}+3\\ 5\end{array}\right)+{K}_{1}{K}_{2}\left(\begin{array}{c}N-{K}_{2}+3\\ 4\end{array}\right)\\ ={\sum }_{\text{begin}=1}^{N-{K}_{2}}\sum \text{begin}×\left({K}_{1}+{E}_{1,\text{begin}}\right)\left({K}_{2}+{E}_{2,\text{begin}}\right)\end{array}$

à

$\begin{array}{l}SUM\text{_}K\left(N,PS,BS,{E}_{1}{E}_{2}\right)\\ ={\sum }_{\text{allitems}}\text{begin}\ast {E}_{1,i}{E}_{2,i}=15\left(\begin{array}{c}N-{K}_{2}+3\\ 6\end{array}\right)+3\left(\begin{array}{c}N-{K}_{2}+3\\ 5\end{array}\right)\end{array}$

$SUM\text{_}K\left(N,PS,BS,{E}_{1}{K}_{2}\right)={\sum }_{\text{allitems}}\text{begin}\ast {E}_{1,i}{K}_{2}=3{K}_{2}\left(\begin{array}{c}N-{K}_{2}+3\\ 5\end{array}\right)$

$SUM\text{_}K\left(N,PS,BS,{K}_{1}{E}_{2}\right)={\sum }_{\text{allitems}}\text{begin}\ast {K}_{1}{E}_{2,i}=4{K}_{1}\left(\begin{array}{c}N-{K}_{2}+3\\ 5\end{array}\right)$

$SUM\text{_}K\left(N,PS,BS,{K}_{1}{K}_{2}\right)={\sum }_{\text{allitems}}\text{begin}\ast {K}_{1}{K}_{2}={K}_{1}{K}_{2}\left(\begin{array}{c}N-{K}_{2}+3\\ 4\end{array}\right)$

In this paper, we extend the definition of Shape of Numbers and generalize the corresponding results.

2. The Extension of Shape

Redefine:

$PS=\left[\text{minItem}\right]=\left[{K}_{0},\cdots ,{K}_{M},\cdots \right]$, $\text{Item}=\left({I}_{0},\cdots ,{I}_{M},\cdots \right)$,

$BASE\left(PS\right)=BS=\left[{G}_{0}=1,{G}_{1},\cdots ,{G}_{M},\cdots \right]$

1) change factor’s domain of definition from N to Z, change K0 from 1 to Z.

2) allow ${K}_{0}\le {K}_{1}\le \cdots \le {K}_{M}$, If ${K}_{i+1}={K}_{i}$, only ${I}_{i+1}={I}_{i}$ is allowed. ${G}_{i+1}-{G}_{i}=1$

3) allow ${K}_{i}>{K}_{i+1}$, only ${I}_{i+1}={I}_{i}$ is allowed. ${G}_{i+1}-{G}_{i}=1$.

Example:

$PS=\left[3,5\right]\to BASE\left(PS\right)=\left[1,3\right]$

$\begin{array}{l}SET\left(8,\left[3,5\right]\right)=\left\{\left(3,5\right),\left(3,6\right),\left(4,6\right),\left(3,7\right),\left(4,7\right),\left(5,7\right)\right\}\\ \ne SET\left(8,\left[1,3\right]\right)-SET\left(5,\left[1,3\right]\right)\end{array}$

$PS=\left[3,5,4,6\right]\to BASE\left(PS\right)=\left[1,3,4,6\right]$

$SET\left(8,PS\right)=\left\{\left(3,5,4,6\right),\left(3,6,5,7\right),\left(4,6,5,7\right),\left(3,5,4,7\right)\right\}$

Redefine:

Basic Shape: K0 = 1 and intervals = 1 or 2

SET(N, PS) = set of items belonging to PS in [K0, N − 1], Max Factor of item ≤ N − 1

PB(PS) = Count of discontinuities in BS

PH(PS) = (Max Factor) − 1 − PB(BS)

IDX(PS) = IDX of $BS=\left\{\mathrm{max}\text{\hspace{0.17em}}\text{factor}\text{\hspace{0.17em}}\text{of}\text{\hspace{0.17em}}BS\right\}+1=PM\left(BS\right)+PB\left(BS\right)+1$

D1f(n): if $f\left(n\right)=\sum {A}_{i}\left(\begin{array}{c}N-{n}_{i}\\ {m}_{i}\end{array}\right)$, then ${D}^{1}f\left(n\right)=\sum {A}_{i}\left(\begin{array}{c}N-{n}_{i}-1\\ {m}_{i}-1\end{array}\right)$

2.1) $|SET\left(N,PS,PT\right)|=\left(\begin{array}{c}N-{K}_{0}-PH\left(PS\right)-PCHG\left(PS,PT\right)\\ PB\left(PT\right)+1\end{array}\right)$

2.2) Specify $\left(\begin{array}{c}N, ${\sum }_{n=0}^{N-1}n\left(\begin{array}{c}n-K\\ M\end{array}\right)=\left(M+1\right)\left(\begin{array}{c}N-K\\ M+2\end{array}\right)+\left(M+K\right)\left(\begin{array}{c}N-K\\ M+1\end{array}\right)$

2.3) $PS=\left[{K}_{0},{K}_{1},\cdots ,{K}_{M}\right]$, $PT=\left[1,{T}_{1},{T}_{2},\cdots ,{T}_{M}\right]$, can use the form $\left({T}_{0}+{K}_{0}\right)\cdots \left({T}_{M}+{K}_{M}\right)$

$SUM\left(N,PS,PT\right)=\sum {A}_{q}\left(\begin{array}{c}N-PH\left(PS\right)-PCHG\left(PS,PT\right)-1\\ IDX\left(PT\right)-q\end{array}\right)$,

${A}_{q}={\prod }_{i=0}^{M}\left({X}_{i}+{D}_{i}\right)$,

${D}_{i}=\left\{\begin{array}{l}-m:{X}_{i}={T}_{i},m=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{0},\cdots ,{X}_{i-1}\right\}\in K\\ +m:{X}_{i}={K}_{i},m=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{0},\cdots ,{X}_{i-1}\right\}\in T\end{array}$

$q=\text{countof}\text{\hspace{0.17em}}X\in K$

[Proof]

Here only prove SUM(N, PS), SUM(N, PS, PT) can use the same method.

$BS=BASE\left(PS\right)=\left[1,{G}_{1},{G}_{2},\cdots ,{G}_{M}\right]$

Use the similar way of , by definition:

(1*) $SUM\left(N,PS\right)={\sum }_{n=-\infty }^{N}\sum END\left(n,PS\right)$

(2*) $\sum END\left(N,PS\right)={D}^{1}SUM\left(N,PS\right)$

(3*) $SUM\left(N,\left[PS,{K}_{M+1}=1+{K}_{M}\right]\right)={\sum }_{n=-\infty }^{N-1}n×\sum END\left(n,PS\right)$

(4*) $SUM\left(N,\left[PS,{K}_{M+1}={K}_{M}\right]\right)={\sum }_{n=-\infty }^{N-1}n×\sum END\left(n+1,PS\right)$

(5*) $SUM\left(N,\left[PS,{K}_{M+1}>1+{K}_{M}\right]\right)={\sum }_{n=-\infty }^{N-1}n×SUM\left(n-\left({K}_{M+1}-{K}_{M}\right)+1,PS\right)$

Suppose $SUM\left(N,PS\right)=\sum {X}_{0}{X}_{1}\cdots {X}_{M}\left(\begin{array}{c}N-PH\left(PS\right)-1\\ {M}_{i}\end{array}\right)$, Max factor of PS = KM

$P=n-PH\left(PS\right)-1=n-\left[{K}_{M}-1-PB\left(BS\right)\right]-1=n-\left[{K}_{M}-PB\left(BS\right)\right]$

$Q=N-PH\left(PS\right)-1$

$C=\text{Countof}\text{\hspace{0.17em}}\left\{{X}_{0},\cdots ,{X}_{M}\right\}\in K$,

${M}_{i}=IDX\left(BS\right)-C$

1) $PS1=\left[PS,{K}_{M+1}=1+{K}_{M}\right]$, $BS1=BASE\left(PS1\right)=\left[BS,{G}_{M+1}=1+{G}_{M}\right]$

$\begin{array}{l}SUM\left(N,PS1\right)={\sum }_{n=-\infty }^{N-1}n×\sum END\left(n,PS\right)={\sum }_{n=-\infty }^{N-1}n×{D}^{1}SUM\left(n,PS\right)\\ ={\sum }_{n=-\infty }^{N-1}n×\sum {X}_{0}\cdots {X}_{M}\left(\begin{array}{c}P-1\\ {M}_{i}-1\end{array}\right)\\ ={\sum }_{n=-\infty }^{N-1}n×\sum {X}_{0}\cdots {X}_{M}\left(\begin{array}{c}n-\left[{K}_{M}-PB\left(BS\right)+1\right]\\ {M}_{i}-1\end{array}\right)\stackrel{\left(2.2\right)}{\to }\\ ={\sum }^{\text{​}}\left({X}_{0}\cdots {X}_{M}{M}_{i}\left(\begin{array}{c}Q-1\\ {M}_{i}+1\end{array}\right)+{X}_{0}\cdots {X}_{M}\left({M}_{i}-1+{K}_{M}-PB\left(BS\right)+1\right)\left(\begin{array}{c}Q-1\\ {M}_{i}\end{array}\right)\right)\end{array}$

${M}_{i}=IDX\left(BS\right)-C=1+{G}_{M}-C={G}_{M+1}-C$

$\begin{array}{l}{M}_{i}-1+{K}_{M}-PB\left(BS\right)+1\\ ={M}_{i}+{K}_{M}-PB\left(BS\right)=IDX\left(BS\right)-C+{K}_{M}-PB\left(BS\right)\\ =\left(PM\left(BS\right)+PB\left(BS\right)+1\right)-C+{K}_{M}-PB\left(BS\right)\\ ={K}_{M}+1+PM\left(BS\right)-C={K}_{M+1}+\left(M+1\right)-C\end{array}$

à

$\begin{array}{l}SUM\left(N,PS1\right)\\ =\sum {X}_{0}\cdots {X}_{M}\left({G}_{M+1}-C\right)\left(\begin{array}{c}Q-1\\ IDX\left(BS\right)-C+1\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\sum {X}_{0}\cdots {X}_{M}\left({K}_{M+1}+M+1-C\right)\left(\begin{array}{c}Q-1\\ IDX\left(BS\right)-C\end{array}\right)\\ =\sum {X}_{0}\cdots {X}_{M}\left({G}_{M+1}-C\right)\left(\begin{array}{c}N-PH\left(PS1\right)-1\\ IDX\left(BS1\right)-C\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\sum {X}_{0}\cdots {X}_{M}\left({K}_{M+1}+M+1-C\right)\left(\begin{array}{c}N-PH\left(PS1\right)-1\\ IDX\left(BS1\right)-\left(C+1\right)\end{array}\right)\end{array}$

à Match the form $\left({G}_{0}+{K}_{0}\right)\left({G}_{1}+{K}_{1}\right)\cdots \left({G}_{M}+{K}_{M}\right)\left\{{G}_{M+1}+{K}_{M+1}\right\}$.

2) $PS1=\left[PS,{K}_{M+1}={K}_{M}\right]$, $BS1=BASE\left(PS1\right)=\left[BS,{G}_{M+1}=1+{G}_{M}\right]$

$\begin{array}{l}SUM\left(N,PS1\right)={\sum }_{n=-\infty }^{N-1}n×{\sum }^{\text{​}}END\left(n+1,PS\right)\\ ={\sum }_{n=-\infty }^{N-1}n×{D}^{1}SUM\left(n+1,PS\right)\\ ={\sum }_{n=-\infty }^{N-1}n×\sum {X}_{0}\cdots {X}_{M}\left(\begin{array}{c}P\\ {M}_{i}-1\end{array}\right)\\ ={\sum }_{n=-\infty }^{N-1}n×\sum {X}_{0}\cdots {X}_{M}\left(\begin{array}{c}n-\left[{K}_{M}-PB\left(BS\right)\right]\\ {M}_{i}-1\end{array}\right)\stackrel{\left( 2.2 \right)}{\to }\end{array}$

$\begin{array}{l}={\sum }^{\text{​}}\left({X}_{0}\cdots {X}_{M}{M}_{i}\left(\begin{array}{c}Q\\ {M}_{i}+1\end{array}\right)+{X}_{0}\cdots {X}_{M}\left({M}_{i}-1+{K}_{M}-PB\left(BS\right)\right)\left(\begin{array}{c}Q\\ {M}_{i}\end{array}\right)\right)\\ =\sum {X}_{0}\cdots {X}_{M}\left({G}_{M+1}-C\right)\left(\begin{array}{c}N-PH\left(PS1\right)-1\\ IDX\left(BS1\right)-C\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\sum {X}_{0}\cdots {X}_{M}\left({K}_{M}+M+1-C\right)\left(\begin{array}{c}N-PH\left(PS1\right)-1\\ IDX\left(BS1\right)-\left(C+1\right)\end{array}\right)\end{array}$

à Match the form $\left({G}_{0}+{K}_{0}\right)\left({G}_{1}+{K}_{1}\right)\cdots \left({G}_{M}+{K}_{M}\right)\left\{{G}_{M+1}+{K}_{M+1}\right\}$.

3) $PS1=\left[PS,\text{}{K}_{M+1}>{K}_{M}+1\right]$, $BS1=BASE\left(PS1\right)=\left[BS,2+{G}_{M}\right]$

$\begin{array}{l}SUM\left(N,PS1\right)={\sum }_{n=-\infty }^{N-1}n×SUM\left(n-\left({K}_{M+1}-{K}_{M}-1\right),PS\right)\\ ={\sum }_{n=-\infty }^{N-1}n×\sum {X}_{0}\cdots {X}_{M}\left(\begin{array}{c}n-\left({K}_{M+1}-{K}_{M}-1\right)-PH\left(PS\right)-1\\ {M}_{i}\end{array}\right)\\ ={\sum }_{n=-\infty }^{N-1}n×\sum {X}_{0}\cdots {X}_{M}\left(\begin{array}{c}n-\left[{K}_{M+1}-{K}_{M}+PH\left(PS\right)\right]\\ {M}_{i}\end{array}\right)\end{array}$

$\begin{array}{c}Q1=N-\left[{K}_{M+1}-{K}_{M}+PH\left(PS\right)\right]\\ =N-\left[{K}_{M+1}-{K}_{M}+{K}_{M}-1-PB\left(BS\right)\right]\\ =N-\left[{K}_{M+1}-1-PB\left(BS\right)\right]\\ =N-\left[{K}_{M+1}-1-PB\left(BS1\right)\right]-1\\ =N-PH\left(PS1\right)-1\end{array}$

$\begin{array}{l}SUM\left(N,PS1\right)\stackrel{\left(2.2\right)}{\to }\\ =\sum {X}_{0}\cdots {X}_{M}\left({M}_{i}+1\right)\left(\begin{array}{c}Q1\\ {M}_{i}+2\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\sum {X}_{0}\cdots {X}_{M}\left({K}_{M+1}-{K}_{M}+PH\left(PS\right)+{M}_{i}\right)\left(\begin{array}{c}Q1\\ {M}_{i}+1\end{array}\right)\end{array}$

${M}_{i}+1=\text{}IDX\left(BS\right)-C+1=1+{G}_{M}-C+1={G}_{M+1}-C$

$\begin{array}{l}{K}_{M+1}-{K}_{M}+PH\left(PS\right)+{M}_{i}=\text{}{K}_{M+1}-{K}_{M}+PH\left(PS\right)+IDX\left(BS\right)-C\\ ={K}_{M+1}-{K}_{M}+\left(\text{}{K}_{M}-1-PB\left(BS\right)\right)+\left(PM\left(BS\right)+PB\left(BS\right)+1\right)-C\\ ={K}_{M+1}+\text{}PM\left(BS\right)-C={K}_{M+1}+M+1-C\end{array}$

à

$\begin{array}{l}SUM\left(N,PS1\right)\\ =\sum {X}_{0}\cdots {X}_{M}\left({G}_{M+1}-C\right)\left(\begin{array}{c}Q1\\ {M}_{i}+2\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\sum {X}_{0}\cdots {X}_{M}\left({K}_{M+1}+M+1-C\right)\left(\begin{array}{c}Q1\\ {M}_{i}+1\end{array}\right)\\ =\sum {X}_{0}\cdots {X}_{M}\left({G}_{M+1}-C\right)\left(\begin{array}{c}Q1\\ IDX\left(BS\right)-C+2\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\sum {X}_{0}\cdots {X}_{M}\left({K}_{M+1}+M+1-C\right)\left(\begin{array}{c}Q1\\ IDX\left(BS\right)-C+1\end{array}\right)\end{array}$

$\begin{array}{l}=\sum {X}_{0}\cdots {X}_{M}\left({G}_{M+1}-C\right)\left(\begin{array}{c}N-PH\left(PS1\right)-1\\ IDX\left(BS1\right)-C\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\sum {X}_{0}\cdots {X}_{M}\left({K}_{M+1}+M+1-C\right)\left(\begin{array}{c}N-PH\left(PS1\right)-1\\ IDX\left(BS1\right)-\left(C+1\right)\end{array}\right)\end{array}$

à Match the form $\left({G}_{0}+{K}_{0}\right)\left({G}_{1}+{K}_{1}\right)\cdots \left({G}_{M}+{K}_{M}\right)\left\{{G}_{M+1}+{K}_{M+1}\right\}$.

4) $PS1=\left[PS,{K}_{M+1}<{K}_{M}\right]$, $BS1=BASE\left(PS1\right)=\left[BS,1+{G}_{M}\right]$

By definition:

$\begin{array}{l}SUM\left(N,\left[PS,{K}_{M+1}\right]\right)={\sum }_{n=-\infty }^{N-1}\left(n+{K}_{M+1}-{K}_{M}\right)\sum END\left(n+1,PS\right)\\ ={\sum }_{n=-\infty }^{N-1}\left(n+{K}_{M+1}-{K}_{M}\right)×{D}^{1}SUM\left(n+1,PS\right)\\ ={\sum }_{n=-\infty }^{N-1}\left(n+{K}_{M+1}-{K}_{M}\right)×\sum {X}_{0}\cdots {X}_{M}\left(\begin{array}{c}p\\ {M}_{i}-1\end{array}\right)\\ ={\sum }_{n=-\infty }^{N-1}n×\sum {X}_{0}\cdots {X}_{M}\left(\begin{array}{c}P\\ {M}_{i}-1\end{array}\right)+{\sum }_{n=-\infty }^{N-1}\left({K}_{M+1}-{K}_{M}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}×\sum {X}_{0}\cdots {X}_{M}\left(\begin{array}{c}P\\ {M}_{i}-1\end{array}\right)\end{array}$

$\begin{array}{l}=\sum {X}_{0}\cdots {X}_{M}\left\{{M}_{i}\left(\begin{array}{c}Q\\ {M}_{i}+1\end{array}\right)+\left({M}_{i}-1+{K}_{M}-PB\left(BS\right)\right)\left(\begin{array}{c}Q\\ {M}_{i}\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left({K}_{M+1}-{K}_{M}\right)\left(\begin{array}{c}Q\\ {M}_{i}\end{array}\right)\right\}\\ =\sum {X}_{0}\cdots {X}_{M}\left\{\left(IDX\left(BS\right)-C\right)\left(\begin{array}{c}Q\\ {M}_{i}+1\end{array}\right)+\left({M}_{i}+{K}_{M+1}-PB\left(BS\right)-1\right)\left(\begin{array}{c}Q\\ {M}_{i}\end{array}\right)\right\}\end{array}$

$\begin{array}{l}{M}_{i}+{K}_{M+1}-PB\left(PS\right)-1=IDX\left(BS\right)-C+{K}_{M+1}-PB\left(BS\right)-1\\ =\left(PM\left(BS\right)+PB\left(BS\right)+1\right)-C+{K}_{M+1}-PB\left(BS\right)-1\\ ={K}_{M+1}+\left(M+1\right)-C\end{array}$

à

$\begin{array}{l}SUM\left(N,PS1\right)\\ =\sum {X}_{0}\cdots {X}_{M}\left({G}_{M+1}-C\right)\left(\begin{array}{c}N-PH\left(PS1\right)-1\\ IDX\left(BS1\right)-C\end{array}\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\sum {X}_{0}\cdots {X}_{M}\left({K}_{M+1}+M+1-C\right)\left(\begin{array}{c}N-PH\left(PS1\right)-1\\ IDX\left(BS1\right)-\left(C+1\right)\end{array}\right)\end{array}$

à Match the form $\left({G}_{0}+{K}_{0}\right)\cdots \left({G}_{M}+{K}_{M}\right)\left\{{G}_{M+1}+{K}_{M+1}\right\}$.

q.e.d.

Example:

$N-PH\left(\left[-11,-7,-4\right]\right)-1=N-\left(-4-2-1\right)-1=N+6$,

$BASE\left(\left[-11,-7,-4\right]\right)=\left[1,3,5\right]$

$SUM\left(N,\left[-11,-7,-4\right]\right)$ à $\text{form}=\left(1-11\right)\left(3-7\right)\left(5-4\right)$ à

$=15\left(\begin{array}{c}N+6\\ 6\end{array}\right)-118\left(\begin{array}{c}N+6\\ 5\end{array}\right)+315\left(\begin{array}{c}N+6\\ 4\end{array}\right)-308\left(\begin{array}{c}N+6\\ 3\end{array}\right)$

$15=1×3×5$ ;

$-308=\left(-11\right)×\left(-7\right)×\left( - 4 \right)$

$-118=1×3×\left(-4+2\right)+1×\left(-7+1\right)\text{}×\left(5-1\right)+\left(-11\right)×\left(3-1\right)\text{}×\left(5-1\right)$

$315=1×\left(-7+1\right)×\left(-4+1\right)+\left(-11\right)×\left(3-1\right)×\left(-4+1\right)+\left(-11\right)×\left(-7\right)×\left(5-2\right)$

$\begin{array}{l}SUM\left(-2,\left[-11,-7,-4\right]\right)\\ =\left(-11\right)×\left(-7\right)×\left(-4\right)+\left(-11\right)×\left(-7\right)×\left(-3\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\text{ }+\left(-11\right)×\left(-6\right)×\left(-3\right)+\left(-10\right)×\left(-6\right)×\left(-3\right)\\ =315-308×4=-917\end{array}$

$\begin{array}{l}SUM\left(-1,\left[-11,-7,-4\right]\right)\\ =SUM\left(-2,\left[-11,-7,-4\right]\right)+\left(-11\right)×\left(-7\right)×\left(-2\right)+\left(-11\right)×\left(-6\right)×\left(-2\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left(-11\right)×\left(-5\right)×\left(-2\right)+\left(-11\right)×\left(-7\right)×\left(-2\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left(-11\right)×\left(-6\right)×\left(-2\right)+\left(-11\right)×\left(-5\right)×\left(-2\right)\\ =-118+315×5-308×10=-1623\end{array}$

$SUM\left(N,\left[4,7,11\right],\left[1,2,4\right]\right)$ à $\text{form}=\left(1+4\right)\left(2+7\right)\left(4+11\right)$ à

$=8\left(\begin{array}{c}N-10\\ 5\end{array}\right)+62\left(\begin{array}{c}N-10\\ 4\end{array}\right)+200\left(\begin{array}{c}N-10\\ 3\end{array}\right)+308\left(\begin{array}{c}N-10\\ 2\end{array}\right)$

$62=1×2×\left(11+2\right)+1×\left(7+1\right)×\left(4-1\right)+4×\left(2-1\right)×\left(4-1\right)$

$200=1×\left(7+1\right)×\left(11+1\right)+4×\left(2-1\right)×\left(11+1\right)+4×7×\left(4-2\right)$

[1, 2, 4] means ${I}_{1}-{I}_{0}={K}_{1}-{K}_{0}=7-4=3$, ${I}_{2}-{I}_{1}={K}_{2}-{K}_{1}\ge 11-7=4$

$\begin{array}{l}SUM\left(15,\left[4,7,11\right],\left[1,2,4\right]\right)\\ =4×7×11+4×7×12+5×8×12+4×7×13+5×8×13\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }+6×9×13+4×7×14+5×8×14+6×9×14+7×10×14\\ =8+62×5+200×10+308×10=5398\end{array}$

$N-PH\left(\left[4,7,1,8\right]\right)-1=N-\left(8-1-2\right)-1=N-6$, $BASE\left(\left[4,7,1,8\right]\right)=\left[1,3,4,6\right]$

$SUM\left(N,\left[4,7,1,8\right]\right)$ à $\text{form}=\left(1+4\right)\left(3+7\right)\left(4+1\right)\left(6+8\right)$ à

$=72\left(\begin{array}{c}N-6\\ 7\end{array}\right)+417\left(\begin{array}{c}N-6\\ 6\end{array}\right)+922\left(\begin{array}{c}N-6\\ 5\end{array}\right)+876\left(\begin{array}{c}N-6\\ 4\end{array}\right)+224\left(\begin{array}{c}N-6\\ 3\end{array}\right)$

$\begin{array}{l}417=1×3×4×\left(8+3\right)+1×3×\left(1+2\right)×\left(6-1\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}+1×\left(7+1\right)×\left(4-1\right)×\left(6-1\right)+4×\left(3-1\right)×\left(4-1\right)×\left(6-1\right)\end{array}$

$\begin{array}{l}922=1×3×\left(1+2\right)×\left(8+2\right)+1×\left(7+1\right)×\left(4-1\right)×\left(8+2\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}+4×\left(3-1\right)×\left(4-1\right)×\left(8+2\right)+1×\left(7+1\right)×\left(1+1\right)×\left(6-2\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}+4×\left(3-1\right)×\left(1+1\right)×\left(6-2\right)+4×7×\left(4-2\right)×\left(6-2\right)\end{array}$

$\begin{array}{l}876=4×7×1×\left(6-3\right)+4×7×\left(4-2\right)×\left(8+1\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}+4×\left(3-1\right)×\left(1+1\right)×\left(8+1\right)+1×\left(7+1\right)×\left(1+1\right)×\left(8+1\right)\end{array}$

$\begin{array}{l}SUM\left(13,\left[4,7,1,8\right]\right)\\ =4×7×1×8+4×7×1×9+\left(4+5\right)×8×2×9+4×7×1×10\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left(4+5\right)×8×2×10+\left(4+5+6\right)×9×3×10+4×7×1×11\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left(4+5\right)×8×2×11+\left(4+5+6\right)×9×3×11+\left(4+5+6+7\right)\end{array}$

$\begin{array}{l}\text{\hspace{0.17em}}\text{\hspace{0.17em}}×10×4×11+4×7×1×12+\left(4+5\right)×8×2×12+\left(4+5+6\right)×9×3×12\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left(4+5+6+7\right)×10×4×12+\left(4+5+6+7+8\right)×11×5×12\\ =72+417×7+922×21+876×35+224×35=60853\end{array}$

2.2. SUM_K(N, PS, PT, PF)

$\text{Anitem}\in PS=\left\{{K}_{0}+{E}_{0},{K}_{1}+{E}_{1},\cdots ,{K}_{M}+{E}_{M}\right\}$, K is fixed, E is variable.

$\text{Aproduct}=\left({K}_{0}+{E}_{0}\right)×\left(\text{}{K}_{1}+{E}_{1}\right)\cdots \left({K}_{M}+{E}_{M}\right)=\sum {F}_{0}{F}_{1}{F}_{2}\cdots {F}_{M}$, ${F}_{i}={E}_{i}$ or ${F}_{i}={K}_{i}$

That is, a product can be broken down into 2M+1 parts.

Use the same method of 

2.4) SUM_K(N, PS, PT, PF) is similar to (1.4), except the form = $\left({T}_{0}+{K}_{0}\right)\cdots$

Example:

$BASE\left(\left[4,7,11\right]\right)=BS=\left[1,3,5\right]$

$\begin{array}{l}SUM\left(13,\left[4,7,11\right]\right)\\ =4×7×11+4×7×\left(11+1\right)+4×\left(7+1\right)×\left(11+1\right)+\left(4+1\right)×\left(7+1\right)×\left(11+1\right)\\ =\left\{4×7×11+4×7×11+4×7×11+4×7×11\right\}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }+\left\{4×7×1+4×7×1+4×7×1\right\}+\left\{4×1×11+4×1×11\right\}+\left\{1×7×11\right\}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }+\left\{4×1×1+4×1×1\right\}+\left\{1×7×1\right\}+\left\{1×1×11\right\}+\left\{1×1×1\right\}\end{array}$

$4×7×11\to 308$

$\begin{array}{l}SUM\text{_}K\left(13,PS,BS,{K}_{0}{K}_{1}{K}_{2}\right)\\ =\left\{4×7×11+4×7×11+4×7×11+4×7×11\right\}=308\left(\begin{array}{c}N-9\\ 3\end{array}\right)\end{array}$

$4×7×\left(5-2\right)\to 4×7×3$

$\begin{array}{l}SUM\text{_}K\left(13,PS,BS,{K}_{0}{K}_{1}{E}_{2}\right)\\ =\left\{4×7×1+4×7×1+4×7×1\right\}=4×7×3\left(\begin{array}{c}N-9\\ 4\end{array}\right)\end{array}$

$4×\left(3-1\right)×\left(11+1\right)\to 4×2×11$

$SUM\text{_}K\left(13,PS,BS,{K}_{0}{E}_{1}{K}_{2}\right)=\left\{4×1×11+4×1×11\right\}=4×2×11\left(\begin{array}{c}N-9\\ 4\end{array}\right)$

$1×\left(7+1\right)×\left(11+1\right)\to 1×7×11$

$SUM\text{_}K\left(13,PS,BS,{E}_{0}{K}_{1}{K}_{2}\right)=\left\{1×7×11\right\}=1×7×11\left(\begin{array}{c}N-9\\ 4\end{array}\right)$

$4×\left(3-1\right)×\left(5-1\right)+\text{}4×\left(3-1\right)×\left(11+1\right)\to 4×3×4+4×2×1$

$\begin{array}{l}SUM\text{_}K\left(13,PS,BS,{K}_{0}{E}_{1}{E}_{2}\right)\\ =\left\{4×1×1+4×1×1\right\}=4×3×4\left(\begin{array}{c}N-9\\ 5\end{array}\right)+4×2×1\left(\begin{array}{c}N-9\\ 4\end{array}\right)\end{array}$

$1×\left(7+1\right)×\left(5-1\right)+1×\left(7+1\right)×\left(11+1\right)\to 1×7×4+1×7×1$

$\begin{array}{l}SUM\text{_}K\left(13,PS,BS,{E}_{0}{K}_{1}{E}_{2}\right)\\ =\left\{1×7×1\right\}=1×7×4\left(\begin{array}{c}N-9\\ 5\end{array}\right)+1×7×1\left(\begin{array}{c}N-9\\ 4\end{array}\right)\end{array}$

$1×3×\left(11+2\right)+1×\left(7+1\right)×\left(11+1\right)\to 1×3×11+1×1×11$

$\begin{array}{l}SUM\text{_}K\left(13,PS,BS,{E}_{0}{E}_{1}{K}_{2}\right)\\ =\left\{1×1×11\right\}=1×3×11\left(\begin{array}{c}N-9\\ 5\end{array}\right)+1×1×11\left(\begin{array}{c}N-9\\ 4\end{array}\right)\end{array}$

$\begin{array}{l}\text{1}×\text{3}×\text{5}+\left[\text{1}×\text{3}×\left(\text{11}+\text{2}\right)+\text{1}×\left(\text{7}+\text{1}\right)×\left(\text{5}-\text{1}\right)+\text{4}×\left(\text{3}-\text{1}\right)×\left(\text{5}-\text{1}\right)\right]\\ +\left[\text{1}×\left(\text{7}+\text{1}\right)×\left(\text{11}+\text{1}\right)+\text{4}×\left(\text{3}-\text{1}\right)×\left(\text{11}+\text{1}\right)+\text{4}×\text{7}×\left(\text{5}-\text{2}\right)\right]\\ \to 1×3×5+\left[1×3×2+1×1×4+0\right]+\left[1×1×1+0+0\right]=15+\left[10\right]+\left[1\right]\end{array}$

$\begin{array}{l}SUM\text{_}K\left(13,PS,BS,{E}_{0}{E}_{1}{E}_{2}\right)\\ =\left\{1×1×1\right\}=15\left(\begin{array}{c}N-9\\ 6\end{array}\right)+10\left(\begin{array}{c}N-9\\ 5\end{array}\right)+\left(\begin{array}{c}N-9\\ 4\end{array}\right)\end{array}$

3. Coefficient Analysis

$K=\left[{K}_{1},\cdots ,{K}_{M}\right]$,

$T=\left[{T}_{1},\cdots ,{T}_{M}\right]$

Use the form $\left({T}_{1}+{K}_{1}\right)\cdots \left({T}_{M}+{K}_{M}\right)=\sum {X}_{1}{X}_{2}\cdots {X}_{M}$, Xi = Ti or Ki

Define $H\left(K,T,N,S\right)=\sum {B}_{N}$, $0\le N\le M$, $N=\text{countof}\text{\hspace{0.17em}}X\in T$

${B}_{N}={\prod }_{i=1}^{M}\left({X}_{i}+{D}_{i}\right)$, ${D}_{i}=\left\{\begin{array}{l}-mS:{X}_{i}={T}_{i},m=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{1},\cdots ,{X}_{i-1}\right\}\in K\\ +mS:{X}_{i}={K}_{i},m=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{1},\cdots ,{X}_{i-1}\right\}\in T\end{array}$

H(K, T, N, 1) is abbreviated as H(K, T, N)

3.1) $H\left(K,T,M\right)={T}_{1}×{T}_{2}×\cdots ×{T}_{M}$, $H\left(K,T,0\right)={K}_{1}×{K}_{2}×\cdots ×{K}_{M}$

 has proved:

$SUM\left(N+1,\left[1,1,\cdots ,1\right],\left[1,2,\cdots ,M\right]\right)={\sum }_{n=1}^{N}{n}^{M}={\sum }_{K=1}^{M}K!{S}_{2}\left(M,K\right)\left(\begin{array}{c}N+1\\ K+1\end{array}\right)$

S2(M, K) is Stirling number of the second kind. à

3.2) $H\left(\left[1,1,\cdots ,1\right],\left[2,3,\cdots ,M\right],N\right)=\left(M-N\right)\text{!}×{S}_{2}\left(M,M-N\right)$

$SUM\left(N,\left[{K}_{0}=1,{K}_{1},\cdots ,{K}_{M}\right],\left[{T}_{0}=1,{T}_{1},\cdots ,{T}_{M}\right]\right)$

can use the form = $\left({T}_{1}+{K}_{1}\right)\cdots \left({T}_{M}+{K}_{M}\right)$ or $\left({T}_{0}+{K}_{0}\right)\left({T}_{1}+{K}_{1}\right)\cdots \left({T}_{M}+{K}_{M}\right)$

For arbitrary K, T:

3.3) $H\left(\left[P,K\right],\left[P,T\right],N,S\right)=P×H\left(K,T,N,S\right)+P×H\left(K,T,N-1,S\right)$

[Proof]

$\begin{array}{l}H\left(\left[P,K,{K}_{M+1}\right],\left[P,T,{T}_{M+1}\right],N+1,S\right)\\ =\left({X}_{M+1}={K}_{M+1}\right)+\left({X}_{M+1}={T}_{M+1}\right)\\ =H\left(\left[P,K\right],\left[P,T\right],N+1,S\right)\left({K}_{M+1}+\left[N+1\right]×S\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+H\left(\left[P,K\right],\left[P,T\right],N,S\right)\left({T}_{M+1}-\left[M+1-N\right]×S\right)\\ =\left\{P×H\left(K,T,N+1,S\right)+P×H\left(K,T,N,S\right)\right\}\left({K}_{M+1}+\left[N+1\right]×S\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left\{P×H\left(K,T,N,S\right)+P×H\left(K,T,N-1,S\right)\right\}\left({T}_{M+1}-\left[M+1-N\right]×S\right)\end{array}$

$\begin{array}{l}=P×\left\{H\left(K,T,N+1,S\right)\left({K}_{M+1}+\left[N+1\right]×S\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+H\left(K,T,N,S\right)\left({T}_{M+1}-\left[M-N\right]×S\right)\right\}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+P×\left\{H\left(K,T,N,S\right){\left({K}_{M+1}+N×S\right)}_{}^{}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+H\left(K,T,N-1,S\right)\left({T}_{M+1}-\left[M-\left(N-1\right)\right]×S\right)\right\}\\ =P×H\left(\left[K,{K}_{M+1}\right],\left[T,{T}_{M+1}\right],N+1,S\right)+P×H\left(\left[K,{K}_{M+1}\right],\left[T,{T}_{M+1}\right],N,S\right)\end{array}$

q.e.d.

this à

3.4) $SUM\left(N,\left[1,2,\cdots ,n,{K}_{1},\cdots ,{K}_{M}\right],\left[1,2,\cdots ,n,{T}_{1},\cdots ,{T}_{M}\right]\right)$

can use the form: $\left({T}_{1}+{K}_{1}\right)\cdots \left({T}_{M}+{K}_{M}\right)=n!\sum {A}_{q}\left(\begin{array}{c}N-PH\left(PS\right)-PCHG\left(PS,PT\right)+n-1\\ IDX\left(PT\right)-q\end{array}\right)$

 has proved:

3.5) $H\left(K,K,N,S\right)=\left(\begin{array}{c}M\\ N\end{array}\right){K}_{1}×{K}_{2}×\cdots ×{K}_{M}$

1.3) can derive 1.2) from this.

3.6) if ${K}_{i}+S={K}_{i+1}$, ${T}_{i}+S={T}_{i+1}$, then $H\left(K,T,N,S\right)=\left(\begin{array}{c}M\\ N\end{array}\right){T}_{1}\cdots {T}_{N}×{K}_{N+1}\cdots {K}_{M}$

[Proof]

Suppose $H\left(K,T,N,S\right)=\left(\begin{array}{c}M\\ N\end{array}\right){T}_{1}\cdots {T}_{N}{K}_{N+1}{K}_{N+2}\cdots {K}_{M}$

$\begin{array}{l}H\left(\left[K,{K}_{M+1}=S+{K}_{M}\right],\left[T,{T}_{M+1}=S+{T}_{M}\right],N+1,S\right)\\ =\left({X}_{M+1}={K}_{M+1}\right)+\left({X}_{M+1}={T}_{M+1}\right)\\ =H\left(K,T,N+1,S\right)\left({K}_{M+1}+\left[N+1\right]×S\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+H\left(K,T,N,S\right)\left({T}_{M+1}-\left[M-N\right]×S\right)\end{array}$

$\begin{array}{l}=\left(\begin{array}{c}M\\ N+1\end{array}\right){T}_{1}\cdots {T}_{N+1}{K}_{N+2}\cdots {K}_{M}\left({K}_{M+1}+\left[N+1\right]×S\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left(\begin{array}{c}M\\ N\end{array}\right){T}_{1}\cdots {T}_{N}{K}_{N+1}\cdots {K}_{M}\left({T}_{M+1}-\left[M-N\right]×S\right)\\ ={T}_{1}\cdots {T}_{N}{K}_{N+2}\cdots {K}_{M}\left(\begin{array}{c}M\\ N+1\end{array}\right){T}_{N+1}\left({K}_{M+1}+\left[N+1\right]×S\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+{T}_{1}\cdots {T}_{N}{K}_{N+2}\cdots {K}_{M}\left(\begin{array}{c}M\\ N\end{array}\right){K}_{N+1}\left({T}_{M+1}-\left[M-N\right]×S\right)\end{array}$

$\begin{array}{l}={T}_{1}\cdots {T}_{N}{K}_{N+2}\cdots {K}_{M}\left(\begin{array}{c}M\\ N+1\end{array}\right)\left[{T}_{N+1}{K}_{M+1}+{T}_{N+1}\left(N+1\right)×S\right]\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+{T}_{1}\cdots {T}_{N}{K}_{N+2}\cdots {K}_{M}\left(\begin{array}{c}M\\ N\end{array}\right)\left[{K}_{M+1}-\left[M-N\right]×S\right]\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}×\left(\left[{T}_{N+1}+\left[M-N\right]×S\right]-\left[M-N\right]×S\right)\end{array}$

$\begin{array}{l}={T}_{1}\cdots {T}_{N}{K}_{N+2}\cdots {K}_{M}\left[\left(\begin{array}{c}M\\ N+1\end{array}\right){T}_{N+1}{K}_{M+1}+\left(\begin{array}{c}M\\ N\end{array}\right){T}_{N+1}{K}_{M+1}\right]\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+{T}_{1}\cdots {T}_{N}{K}_{N+2}\cdots {K}_{M}\left[\left(\begin{array}{c}M\\ N+1\end{array}\right){T}_{N+1}\left(N+1\right)-\left(\begin{array}{c}M\\ N\end{array}\right){T}_{N+1}\left(M-N\right)\right]×S\\ ={T}_{1}\cdots {T}_{N}{K}_{N+2}\cdots {K}_{M}\left[\left(\begin{array}{c}M\\ N+1\end{array}\right){T}_{N+1}{K}_{M+1}+\left(\begin{array}{c}M\\ N\end{array}\right){T}_{N+1}{K}_{M+1}\right]\\ =\left(\begin{array}{c}M+1\\ N+1\end{array}\right){T}_{1}\cdots {T}_{N+1}{K}_{N+2}\cdots {K}_{M+1}\end{array}$

à $H\left(\left[K,{K}_{M+1}\right],\left[T,{T}_{M+1}\right],N+1,S\right)$ holds

q.e.d.

Define

${F}_{Q}^{K}=\sum Q-\text{productwithdifferentfactors}\in K$, the sum traverse all combinations.

${E}_{Q}^{K}=\sum Q-\text{product}\text{\hspace{0.17em}}\text{with}\text{\hspace{0.17em}}\text{factors}\in K$, the sum traverse all combinations.

${F}_{Q}^{\left\{1,2,\cdots ,N\right\}}$ is abbreviated as ${F}_{Q}^{N}$, ${E}_{Q}^{\left\{1,2,\cdots ,N\right\}}$ is abbreviated as ${E}_{Q}^{N}$ ;

${F}_{0}^{K}={E}_{0}^{K}=1$ ; ${F}_{Q>|K|}^{K}=0$ ;

By definition:

${E}_{Q}^{N+1}=\left(N+1\right){E}_{Q-1}^{N+1}+{E}_{Q}^{N};\text{\hspace{0.17em}}\text{\hspace{0.17em}}{F}_{Q}^{\left[K,{K}_{M+1}\right]}={K}_{M+1}{F}_{Q-1}^{K}+{F}_{Q}^{K}$.

3.7) if ${T}_{i}+1={T}_{i+1}$, then $H\left(K,T,N\right)={T}_{1}\cdots {T}_{N}\left[{F}_{M-N}^{K}{E}_{0}^{N}+{F}_{M-N-1}^{K}{E}_{1}^{N}+\cdots ++{F}_{0}^{K}{E}_{M-N}^{N}\right]$

[Proof]

Suppose H(K, T, N) holds

$\begin{array}{l}H\left(\left[K,{K}_{M+1}\right],\left[T,{T}_{M+1}=1+{T}_{M}\right],N+1\right)\\ =H\left(K,T,N+1\right)\left({K}_{M+1}+N+1\right)+H\left(K,T,N\right)\left({T}_{M+1}-\left[M-N\right]\right)\\ ={T}_{1}\cdots {T}_{N+1}\left[{F}_{M-N-1}^{K}{E}_{0}^{N+1}+{F}_{M-N-2}^{K}{E}_{1}^{N+1}+\cdots +{F}_{0}^{K}{E}_{M-N-1}^{N+1}\right]\left({K}_{M+1}+N+1\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }+{T}_{1}\cdots {T}_{N}\left[{F}_{M-N}^{K}{E}_{0}^{N}+{F}_{M-N-1}^{K}{E}_{1}^{N}+\cdots +{F}_{0}^{K}{E}_{M-N}^{N}\right]\left({T}_{M+1}-\left[M-N\right]\right)\\ ={T}_{1}\cdots {T}_{N+1}\left[{F}_{M-N-1}^{K}{E}_{0}^{N+1}+{F}_{M-N-2}^{K}{E}_{1}^{N+1}+\cdots +{F}_{0}^{K}{E}_{M-N-1}^{N+1}\right]\left({K}_{M+1}+N+1\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }+{T}_{1}\cdots {T}_{N+1}\left[{F}_{M-N}^{K}{E}_{0}^{N}+{F}_{M-N-1}^{K}{E}_{1}^{N}+\cdots +{F}_{0}^{K}{E}_{M-N}^{N}\right]\end{array}$

$\begin{array}{l}H\left(\left[K,{K}_{M+1}\right],\left[T,{T}_{M+1}=1+{T}_{M}\right],N+1\right)/{T}_{1}\cdots {T}_{N+1}\\ =\left[{F}_{M-N-1}^{K}{E}_{0}^{N+1}+{F}_{M-N-2}^{K}{E}_{1}^{N+1}+\cdots +{F}_{0}^{K}{E}_{M-N-1}^{N+1}\right]\left({K}_{M+1}+N+1\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }+\left[{F}_{M-N}^{K}{E}_{0}^{N}+{F}_{M-N-1}^{K}{E}_{1}^{N}+\cdots +{F}_{0}^{K}{E}_{M-N}^{N}\right]\end{array}$

$\begin{array}{l}\text{Sumofallitemswithcountoffactors}\in K=M-N-Q\\ ={F}_{M-\left[N+1\right]-Q}^{K}{E}_{Q}^{N+1}{K}_{M+1}+{F}_{M-\left[N+1\right]-\left(Q-1\right)}^{K}{E}_{Q-1}^{N+1}\left(N+1\right)+{F}_{M-N-Q}^{K}{E}_{Q}^{N}\\ ={F}_{M-\left[N+1\right]-Q}^{K}{E}_{Q}^{N+1}{K}_{M+1}+{F}_{M-N-Q}^{K}\left[\left(N+1\right){E}_{Q-1}^{N+1}+{E}_{Q}^{N}\right]\\ ={F}_{M-\left[N+1\right]-Q}^{K}{E}_{Q}^{N+1}{K}_{M+1}+{F}_{M-N-Q}^{K}{E}_{Q}^{N+1}\\ ={F}_{M-N-Q}^{\left[K,{K}_{M+1}\right]}{E}_{Q}^{N+1}={F}_{\left[M+1\right]-\left[N+1\right]-Q}^{\left[K,{K}_{M+1}\right]}{E}_{Q}^{N+1}\end{array}$

à $H\left(\left[K,{K}_{M+1}\right],\left[T,{T}_{M+1}\right],N+1\right)$ holds

q.e.d.

Example:

$\begin{array}{l}H\left(\left[A,B,C,D\right],\left[1,2,3,4\right],2\right)\\ =1×2×\left(C+2\right)\left(D+2\right)+1×\left(B+1\right)×\left(3-1\right)\left(D+2\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+A×\left(2-1\right)×\left(3-1\right)\left(D+2\right)+1×\left(B+1\right)\left(C+1\right)\left(4-2\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+A×\left(2-1\right)×\left(C+1\right)\left(4-2\right)+AB\left(3-1\right)\left(4-2\right)\end{array}$

$\begin{array}{l}=1×2\left[\left(C+2\right)\left(D+2\right)+\left(B+1\right)\left(D+2\right)+A\left(D+2\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left(B+1\right)\left(C+1\right)+A\left(C+1\right)+AB\right]\\ =1×2\left[\left(CD+BD+AD+BC+AC+AB\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left(C+D+B+A\right)\left(1+2\right)+\left(1×2+1×1+2×2\right)\right]\end{array}$

3.8) In $SUM\left(N,\left[{K}_{1},\cdots ,{K}_{M}\right],\left[1,2,\cdots ,M\right]\right)$, Ki can switch the order.

3.9) if ${T}_{i}+S={T}_{i+1}$, then

$\begin{array}{l}H\left(K,T,N,S\right)\\ ={T}_{1}\cdots {T}_{N}\left[{F}_{M-N}^{K}{E}_{0}^{\left\{S,2S,\cdots ,NS\right\}}+{F}_{M-N-1}^{K}{E}_{1}^{\left\{S,2S,\cdots ,NS\right\}}+\cdots +{F}_{0}^{K}{E}_{M-N}^{N\left\{S,2S,\cdots ,NS\right\}}\right]\end{array}$

${F}_{M-N}^{M}={S}_{1}\left(M+1,N+1\right)$, S1 is the first kind of unsigned Stirling number.

From 3.5) and 3.7)à

$\begin{array}{l}H\left(\left[1,\cdots ,M-1\right],\left[1,\cdots ,M-1\right],N\right)=\left(M-1\right)!\left(\begin{array}{c}M-1\\ N\end{array}\right)\\ =N!\left[{F}_{M-1-N}^{M-1}{E}_{0}^{N}+{F}_{M-1-N-1}^{M-1}{E}_{1}^{N}+\cdots +{F}_{0}^{M-1}{E}_{M-1-N}^{N}\right]\\ =N!\left[{S}_{1}\left(M,N+1\right){E}_{0}^{N}+{S}_{1}\left(M,N+2\right){E}_{1}^{N}+\cdots +{S}_{1}\left(M,M\right){E}_{M-1-N}^{N}\right]\end{array}$ à

3.10) $\begin{array}{l}{S}_{1}\left(M,N+1\right){E}_{0}^{N}+{S}_{1}\left(M,N+2\right){E}_{1}^{N}+\cdots +{S}_{1}\left(M,M\right){E}_{M-1-N}^{N}\\ =\left(\begin{array}{c}M-1\\ N\end{array}\right)\frac{\left(M-1\right)!}{N!}\end{array}$

4. $\begin{array}{l}{K}_{1}×\cdots ×{K}_{M}+\left(L+{K}_{1}\right)×\cdots ×\left(L+{K}_{M}\right)\\ +\left(2L+{K}_{1}\right)×\cdots ×\left(2L+{K}_{M}\right)+\cdots \end{array}$

$K=\left[{K}_{1},\cdots ,{K}_{M}\right]$, $T=\left[{T}_{1},\cdots ,{T}_{M}\right]$, Max Factor = KM

$\begin{array}{c}SUM\left(N,PS,PT\right)={\sum }_{n=-\infty }^{N}\sum END\left(n,PS,PT\right)\\ ={\sum }_{n={K}_{M}+1}^{N}\sum END\left(n,PS,PT\right)\\ =\sum {A}_{q}\left(\begin{array}{c}N-PH\left(PS\right)-PCHG\left(PS,PT\right)-1\\ IDX\left(PT\right)-q\end{array}\right)\end{array}$

When $N={K}_{M}+1$

$\begin{array}{l}N-PH\left(PS\right)-PCHG\left(PS,PT\right)-1\\ =N-\left({K}_{M}-1-PB\left(BS\right)\right)-PCHG\left(PS,PT\right)-1\\ =PB\left(BS\right)-PCHG\left(PS,PT\right)+1\\ =PB\left(PT\right)+1=IDX\left(PT\right)-M\end{array}$

à $SUM\left(N,PS,PT\right)={A}_{M}$

$\text{Aproduct}=\left({K}_{1}+{E}_{1}\right)\cdots \left({K}_{M}+{E}_{M}\right)=\sum {F}_{1}{F}_{2}\cdots {F}_{M}$, ${F}_{i}={E}_{i}$ or ${F}_{i}={K}_{i}$

SUM(N, PS, PT) can be broken down into 2M parts.

SUM_K(N, PS, PT, PF) can explain why SUM(N, PS, PT) has that strange form:

We can calculate every part of SUM() by some way without the form. There may be complex relationships between the parts, but their sum just match a simple form.

SUM_K(N, PS, PT, PF) use the form =

$\left({T}_{1}+{K}_{1}\right)\cdots \left({T}_{M}+{K}_{M}\right)=\sum {\prod }_{i=1}^{M}{Y}_{i}\left(\begin{array}{c}A\\ {M}_{q}\end{array}\right)$

${Y}_{i}=\left\{\begin{array}{l}0:{F}_{i}={K}_{i},{X}_{i}={T}_{i}\\ {K}_{i}:{F}_{i}={K}_{i},{X}_{i}={K}_{i}\\ {T}_{i}-{D}_{i}:{F}_{i}={E}_{i},{X}_{i}={T}_{i},{D}_{i}=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{1},\cdots ,{X}_{i-1}\right\}\in K\\ {D}_{i}:{F}_{i}={E}_{i},{X}_{i}={K}_{i},{D}_{i}=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{1},\cdots ,{X}_{i-1}\right\}\in T\end{array}$

When Ti and Di all increase L times. If $PT=\left[1,2,\cdots ,M\right]$, when N increase,

$|End\left(N,PS,PT\right)|=1$, match the corresponding SUM_K().

Define

$SUML\left(N,PS,1\right)=SUM\left(N+{K}_{M},PS,\left[1,2,\cdots ,M\right]\right)$

$\begin{array}{c}SUML\left(N,PS,L\right)={K}_{1}×\cdots ×{K}_{M}+\left(L+{K}_{1}\right)×\cdots ×\left(L+{K}_{M}\right)+\cdots \\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\left(\left(N-1\right)L+{K}_{1}\right)×\cdots ×\left(\left(N-1\right)L+{K}_{M}\right)\end{array}$

SUML_K(N, PS, PF, L) = corresponding part of SUML(N, PS, L)

Above à

4.1) SUML(N, PS, L), SUML_K(N, PS, PF, L),

$PT=\left[{T}_{1},\cdots ,{T}_{M}\right]=\left[1×L,2×L,\cdots ,M×L\right]$, can use the from $\left({T}_{1}+{K}_{1}\right)\cdots \left({T}_{M}+{K}_{M}\right)$

$SUML\left(N,PS,L\right)=\sum {A}_{q}\left(\begin{array}{c}N\\ M+1-q\end{array}\right)$, $q=\text{countof}\text{\hspace{0.17em}}X\in K$, 2M items in total.

${A}_{q}={\prod }_{i=1}^{M}\left({X}_{i}+{D}_{i}\right)$, ${D}_{i}=\left\{\begin{array}{l}-mL:{X}_{i}={T}_{i},m=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{1},\cdots ,{X}_{i-1}\right\}\in K\\ +mL:{X}_{i}={K}_{i},m=\text{countof}\text{\hspace{0.17em}}\left\{{X}_{1},\cdots ,{X}_{i-1}\right\}\in T\end{array}$

Example:

$SUML\left(N,\left[3,5,8\right],4\right)$ à

$\text{form}=\left(1×4+3\right)\left(2×4+5\right)\left(3×4+8\right)=\left(4+3\right)\left(8+5\right)\left(12+8\right)$ à

$=384\left(\begin{array}{c}N\\ 4\end{array}\right)+896\left(\begin{array}{c}N\\ 3\end{array}\right)+636\left(\begin{array}{c}N\\ 2\end{array}\right)+120\left( N 1 \right)$

$384=4×8×12$ ; $120=3×5×8$

$\begin{array}{l}896=4×8×\left(8+2×4\right)+4×\left(5+1×4\right)×\left(12-1×4\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}+3×\left(8-1×4\right)×\left(12-1×4\right)\end{array}$

$\begin{array}{l}636=3×5×\left(12-2×4\right)+3×\left(8-1×4\right)×\left(8+1×4\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}+4×\left(5+1×4\right)×\left(8+1×4\right)\end{array}$

$\begin{array}{l}SUML\left(6,\left[3,5,8\right],4\right)\\ =3×5×8+7×9×12+11×13×16+15×17×20\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+19×21×24+23×25×28\\ =384×15+896×20+636×15+120×6=33940\end{array}$

$SUML\left(N,\left[1\right],2\right)=1+3+\cdots +\left(2N-1\right)=2\left(\begin{array}{c}N\\ 2\end{array}\right)+\left(\begin{array}{c}N\\ 1\end{array}\right)={N}^{2}$

4.2) P is a prime number, For arbitrary ${K}_{1},{K}_{2},\cdots ,{K}_{M}$ :

If $M, then

$\begin{array}{l}{K}_{1}×{K}_{2}×\cdots ×{K}_{M}+\left(L+{K}_{1}\right)×\cdots ×\left(L+{K}_{M}\right)+\cdots \\ +\left(\left(P-1\right)L+{K}_{1}\right)×\cdots ×\left(\left(P-1\right)L+{K}_{M}\right)\equiv 0\text{}MOD\text{}P\end{array}$

If $M=P-1$ and $\left(L,P\right)=1$ then

$\begin{array}{l}{K}_{1}×{K}_{2}×\cdots ×{K}_{M}+\left(L+{K}_{1}\right)×\cdots ×\left(L+{K}_{M}\right)+\cdots \\ +\left(\left(P-1\right)L+{K}_{1}\right)×\cdots ×\left(\left(P-1\right)L+{K}_{M}\right)\equiv -1\text{}MOD\text{}P\end{array}$

[Proof]

$\text{Theexpression}=SUML\left(P,PS,L\right)=\sum {A}_{q}\left(\begin{array}{c}P\\ M+1-q\end{array}\right)$

If $M, then $M+1

If $M=P-1$ and $\left(L,P\right)=1$, then

$\begin{array}{c}SUML\left(N,PS,L\right)={L}^{P-1}\left(P-1\right)!\left(\begin{array}{c}P\\ P\end{array}\right)+\sum {A}_{q}\left(\begin{array}{c}P\\ M+1-q\end{array}\right),q>0\\ \equiv {L}^{P-1}\left(P-1\right)!\equiv -1\text{}MOD\text{}P\end{array}$

q.e.d.

5. Conclusions

The whole process of [1-3] is reviewed and this paper:

 tries to calculate all products of k distinct integers in [1, N − 1], introduces the concept of Shape of numbers. The idea divides all products of k distinct integers in [1, N − 1] into 2K−1 catalogs and derives the calculation formula of every catalog, that is 1.2).

 only introduces the basic shape. The conclusion is obtained through the derivation process.

 introduces the shape $PS=\left[1,{K}_{1},\cdots ,{K}_{M}\right]$, tries to calculate SUM(N, PS), the form $\left({G}_{1}+{K}_{1}\right)\left({G}_{2}+{K}_{2}\right)\cdots \left({G}_{M}+{K}_{M}\right)$ is guessed by observation and proved by induction.

At the same time, SUM_K() is introduced.

 introduces the subset, and shows the way to calculate ${1}^{M}+{2}^{M}+{3}^{M}+\cdots +{N}^{M}$.

In this paper, the Shape and the form are further extended. So a lot of numbers’s series can be calculated.

Some new congruences are also obtained in    and this article.

The whole foundation is just $\left(\begin{array}{c}N\\ M\end{array}\right)+\left(\begin{array}{c}N\\ M+1\end{array}\right)=\left(\begin{array}{c}N+1\\ M+1\end{array}\right)$.

Cite this paper: Peng, J. (2021) Expansion of the Shape of Numbers. Open Access Library Journal, 8, 1-18. doi: 10.4236/oalib.1107120.
References

   Peng, J. (2020) Shape of Numbers and Calculation Formula of Stirling Numbers. Open Access Library Journal, 7, 1-11. https://doi.org/10.4236/oalib.1106081

   Peng, J. (2020) Subdivide the Shape of Numbers and a Theorem of Ring. Open Access Library Journal, 7, 1-14. https://doi.org/10.4236/oalib.1106719

   Peng, J. (2020) Subset of the Shape of Numbers. Open Access Library Journal, 7, 1-15.
https://doi.org/10.4236/oalib.1107040

Top