<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OALibJ</journal-id><journal-title-group><journal-title>Open Access Library Journal</journal-title></journal-title-group><issn pub-type="epub">2333-9705</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/oalib.1106081</article-id><article-id pub-id-type="publisher-id">OALibJ-99027</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Biomedical&amp;Life Sciences</subject><subject> Business&amp;Economics</subject><subject> Chemistry&amp;Materials Science</subject><subject> Computer Science&amp;Communications</subject><subject> Earth&amp;Environmental Sciences</subject><subject> Engineering</subject><subject> Medicine&amp;Healthcare</subject><subject> Physics&amp;Mathematics</subject><subject> Social Sciences&amp;Humanities</subject></subj-group></article-categories><title-group><article-title>
 
 
  Shape of Numbers and Calculation Formula of Stirling Numbers
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Ji</surname><given-names>Peng</given-names></name><xref ref-type="aff" rid="aff1"><sub>1</sub></xref></contrib></contrib-group><aff id="aff1"><label>1</label><addr-line>Department of Electronic Information, Nanjing University, Nanjing, China</addr-line></aff><pub-date pub-type="epub"><day>05</day><month>03</month><year>2020</year></pub-date><volume>07</volume><issue>03</issue><fpage>1</fpage><lpage>11</lpage><history><date date-type="received"><day>16,</day>	<month>January</month>	<year>2020</year></date><date date-type="rev-recd"><day>20,</day>	<month>March</month>	<year>2020</year>	</date><date date-type="accepted"><day>23,</day>	<month>March</month>	<year>2020</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  
    This article investigated the idea of Shape of numbers and introduced new operators. The idea divides all products of k distinct integers in [1, n - 1] into 2
   <sup>K-1</sup> catalogs and derives the calculation formula of every catalog. As a simple deduction, a direct formula of the Stirling numbers of the first kind S1(n, n - k) and a simple recursive formula of Stirling numbers of the second kind S2(n, n - k) are obtained. By analyzing the Shape of numbers, new congruence formulas are obtained. 
  
 
</p></abstract><kwd-group><kwd>Combinatorics</kwd><kwd> Shape of Numbers</kwd><kwd> Stirling Numbers</kwd><kwd> Congruence Formula</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>In combinatorial mathematics, Stirling numbers refer to two kinds of numbers [<xref ref-type="bibr" rid="scirp.99027-ref1">1</xref>] : the first and the second. The first kind of Stirling number represents the number of M circles arranged by N different elements. The second kind of Stirling number represents the number of schemes to split N different elements into M sets. Many papers have researched the general calculation formula of the first Stirling number S1(n, n − k) and the second Stirling number S2(n, n − k), but general results are not obtained.</p><p>This article originate from the solution of the sum of all products of k distinct integers in [1, n − 1] without using combination counting.</p></sec><sec id="s2"><title>2. Shape of Numbers</title><p>C ( N , M ) is binomial coefficient, Integral polynomial can be expressed as f ( n ) = ∑ K i * C ( n , m i ) [<xref ref-type="bibr" rid="scirp.99027-ref2">2</xref>]. Here K<sub>i</sub> is the coefficient, m<sub>i</sub> is the exponent.</p><p>Definition 2.1 operator:</p><p>L A C ( N , M ) = M * C ( N , M + 1 ) , L B C ( N , M ) = ( M + 1 ) * C ( N , M + 2 )</p><p>It is easy to prove that different operators do not satisfy the commutative law, and the same operator can be written in the form of power.</p><p>L B ( L A C ( N , M ) ) = L B ( M * C ( N , M + 1 ) ) = ( M + 2 ) * M * C ( N , M + 3 )</p><p>L A ( L B C ( N , M ) ) = L A ( ( M + 1 ) * C ( N , M + 2 ) ) = ( M + 2 ) * ( M + 1 ) * C ( N , M + 3 )</p><p>L A 2 C ( N , M ) = M * ( M + 1 ) * C ( N , M + 2 )</p><p>L B 2 C ( N , M ) = ( M + 1 ) * ( M + 3 ) * C ( N , M + 4 )</p><p>L A ( L A 2 C ( N , M ) ) = M * ( M + 1 ) * ( M + 2 ) * C ( N , M + 3 ) = L A 2 ( L A C ( N , M ) )</p><p>L B ( L B 2 C ( N , M ) ) = ( M + 1 ) * ( M + 3 ) * ( M + 5 ) * C ( N , M + 6 ) = L B 2 ( L B C ( N , M ) )</p><p>Definition 2.2: Let f ( n ) = ∑ K i * C ( n , m i ) , then L A f ( n ) = ∑ K i * L A C ( n , m i ) , L B f ( n ) = ∑ K i * L B C ( n , m i ) .</p><p>Easy to prove:</p><p>C ( N , M + 1 ) = ∑ n = 0 N − 1 C ( n , M ) [<xref ref-type="bibr" rid="scirp.99027-ref1">1</xref>] (1)</p><p>∑ n = 0 N − 1 M * C ( n , M ) = L A C ( N , M ) (2)</p><p>∑ n = 0 N − 1 ( n − M ) * C ( n , M ) = L B C ( N , M ) (3)</p><p>∑ n = 0 N − 1 n * C ( n − 1 , M ) = L B C ( N , M ) (4)</p><p>∑ n = 0 N − 1 n * f ( n ) = L A f ( n ) + L B f ( n ) (5)</p><p>Proof:</p><p>Let f ( n ) = ∑ K i * C ( n , m i )</p><p>∑ n = 0 N − 1 n * f ( n ) = ∑ K i * ∑ n = 0 N − 1 m i * C ( n , m i ) + ∑ K i * ∑ n = 0 N − 1 ( n − m i ) * C ( n , m i ) = L A f ( n ) + L B f (n)</p><p>Definition 2.3: An unordered pair of M different positive integers ( K 1 , K 2 , ⋯ , K m ), sort K<sub>i</sub> from small to large, there are M − 1 intervals between adjacent numbers. Use A for continuity and B for discontinuity, record as a string of M − 1 characters (for example: AABB...) to represents a catalog, define collection of all catalogs as Shape of numbers. Use the symobl PX represent a catelog (if M = 1 then PX = 1). The single ( K 1 , K 2 , ⋯ , K m ) is a Item, K 1 * K 2 * ⋯ * K m is the product of a item, K<sub>i</sub> is called the factor.</p><p>For example:</p><p>(1, 2, 4) have 2 intervals, the number 1 and 2 is continuous, 2 and 4 is discontinuous, then PX = AB;</p><p>(200, 213, 600, 601) have 3 intervals, 200 and 213 is discontinuous, 600 and 601 is continuous, then PX = BBA;</p><p>(1, 2, 5, 6), (2, 3, 6, 7), (20, 21, 60, 61) PX = ABA; (1, 3, 5), (1, 3, 6), (2, 4, 6), (200, 401, 678) PX = BB.</p><p>Definition 2.4:</p><p>PM = Count of numbers in PX, PA = Count of A in PX, PB = Count of B in PX</p><p>Obviously, P M = P A + P B + 1</p><p>|PX| = Count of items belonging to PX</p><p>MIN(PX) = Minimum product of PX, for example: M I N ( A A ) = 1 * 2 * 3 , M I N ( A B ) = 1 * 2 * 4</p><p>IDX(PX) = 2 + PA + 2 * PB = PM + PB + 1, for example: I D X ( A A ) = 4 , I D X ( A B ) = 5</p><p>SUM(N, PX) = Sum of all the product of items belonging to PX in [ 1 , N − 1 ] , for example: S U M ( 6 , A B ) = 1 * 2 * 4 + 1 * 2 * 5 + 2 * 3 * 5</p><p>END(N, PX) = Set of items belonging to PX with the maximum factor N − 1</p><p>For example: E N D ( 6 , B ) = { ( 1 , 5 ) , ( 2 , 5 ) , ( 3 , 5 ) }</p><p>Obviously:</p><p>E N D ( I D X , P X ) = { M I N } , the minimum factor of MIN(PX) is 1, the maximum factor of MIN(PX) is IDX(PX) − 1.</p><p>Easy to prove: S U M ( N , 1 ) = C ( N , 2 ) ; S U M ( N , A ) = 1 * 2 * C ( N , 3 ) ; S U M ( N , B ) = 1 * 3 * C ( N , 4 )</p><p>Definition 2.5:</p><p>PX + A = Attach A at PX tail</p><p>PX + B = Attach B at PX tail</p><p>PX − 1 = Remove the tail of PX</p><p>PX − A = PX ends with A and remove the tail</p><p>PX − B = PX ends with B and remove the tail</p><p>For example: A B + A = A B A , A B + B = A B B , A B A − A = A B B − B = A B , it is meaningless to A B A − B , A B B − A .</p><p>Definition 2.6 short form:</p><p>I d x = I D X ( P X ) , I d x A = I D X ( P X + A ) , I d x B = I D X ( P X + B ) ,</p><p>M i n = M I N ( P X ) , M i n A = M I N ( P X + A ) , M i n B = M I N ( P X + B )</p><p>From definition:</p><p>M i n A = M i n * I d x (6)</p><p>M i n B = M i n * ( I d x + 1 ) (7)</p><p>∑ E N D ( N , P X + A ) = ( N − 1 ) * ∑ E N D ( N − 1 , P X ) (8)</p><p>∑ E N D ( N , P X + B ) = ( N − 1 ) * S U M ( N − 2 , P X ) (9)</p><p>(2.1) S U M ( N , P X + A ) = L A S U M ( N , P X ) , S U M ( N , P X + B ) = L B S U M ( N , P X )</p><p>Proof:</p><p>For PX = 1, direct validation:</p><p>S U M ( N , A ) = 1 * 2 * C ( N , 3 ) = L A C ( N , 2 ) = L A S U M ( N , 1 ) ;</p><p>S U M ( N , B ) = 1 * 3 * C ( N , 3 ) = L B C ( N , 2 ) = L B S U M ( N , 1 )</p><p>For general PX:</p><p>S U M ( N , P X + B ) = ∑ E N D ( N , P X + B ) + S U M ( N − 1 , P X + B ) = ( N − 1 ) * S U M ( N − 2 , P X ) + S U M ( N − 1 , P X + B ) = ∑ n = 0 N − 1 n * S U M ( n − 1 , P X ) = L B S U M ( N , P X )</p><p>The last step is obtained from (4).</p><p>S U M ( N , P X + A ) + S U M ( N , P X + B ) = ( N − 1 ) * S U M ( N − 1 , P X ) + S U M ( N − 1 , P X + A ) + S U M ( N − 1 , P X + B ) = ∑ n = 0 N − 1 n * S U M ( n , P X ) = L A S U M ( N , P X ) + L B S U M ( N , P X )</p><p>→ S U M ( N , P X + A ) = L A S U M ( N , P X )</p><p>(2.2) S U M ( N , P X ) = M i n * C ( N , I d x ) , ∑ E N D ( N , P X ) = M i n * C ( N − 1 , I d x − 1 )</p><p>Proof:</p><p>P X = A : S U M ( N , A ) = 1 * 2 * C ( N , 3 ) = M I N ( A ) * C ( N , I D X (A) )</p><p>P X = B : S U M ( N , B ) = 1 * 3 * C ( N , 4 ) = M I N ( B ) * C ( N , I D X (B) )</p><p>For general PX, From (2.1):</p><p>S U M ( N , P X + A ) = L A S U M ( N , P X ) = L A { M i n * C ( N , I d x ) } = M i n * I d x * C ( N , I d x + 1 ) = M i n A * C ( N , I d x A )</p><p>S U M ( N , P X + B ) = L B S U M ( N , P X ) = L B { M i n * C ( N , I d x ) } = M i n * ( I d x + 1 ) * C ( N , I d x + 2 ) = M i n B * C ( N , I d x B )</p><p>∑ E N D ( N , P X ) = M i n * C ( N , I d x ) − M i n * C ( N − 1 , I d x ) = M i n * C ( N − 1 , I d x − 1 )</p><p>q.e.d.</p><p>This is a series of formulas, for example:</p><p>S U M ( 6 , A A ) = 1 * 2 * 3 + 2 * 3 * 4 + 3 * 4 * 5 = 1 * 2 * 3 * C ( 6 , 4 ) = 90</p><p>S U M ( 6 , A B ) = 1 * 2 * 4 + 1 * 2 * 5 + 2 * 3 * 5 = 1 * 2 * 4 * C ( 6 , 5 ) = 48</p><p>S U M ( 6 , B A ) = 1 * 3 * 4 + 1 * 4 * 5 + 2 * 4 * 5 = 1 * 3 * 4 * C ( 6 , 5 ) = 72</p><p>S U M ( 7 , B B ) = 1 * 3 * 5 + 1 * 3 * 6 + 1 * 4 * 6 + 2 * 4 * 6 = 1 * 3 * 5 * C ( 7 , 6 ) = 105</p><p>S U M ( 8 , B B ) = S U M ( 7 , B B ) + 1 * ( 3 + 4 + 5 ) * 7 + 2 * ( 4 + 5 ) * 7 + 3 * 5 * 7 = 1 * 3 * 5 * C ( 8 , 6 ) = 420</p><p>S U M ( 8 , B A B ) = 1 * 3 * 4 * 6 + 1 * ( 3 * 4 + 4 * 5 ) * 7 + 2 * 4 * 5 * 7 = 576 = 1 * 3 * 4 * 6 * C ( 8 , 7 )</p><p>S U M ( 9 , B A B ) = S U M ( 8 , B A B ) + 1 * ( 3 * 4 + 4 * 5 + 5 * 6 ) * 8     + 2 * ( 4 * 5 + 5 * 6 ) * 8 + 3 * 5 * 6 * 8 = 2592 = M i n * C ( 9 , 7 )</p></sec><sec id="s3"><title>3. The Direct Calculation Formula of S1(n, n − k)</title><p>Definition 3.1: F 1 ( N , M ) = S 1 ( N , N − M ) , specify F 1 ( N , 0 ) = 1 ; F 1 ( N , M ) = 0 ( N ≤ M )</p><p>Already know F 1 ( N , 0 ) = C ( N , 0 ) ; F 1 ( N , 1 ) = C ( N , 2 ) ; F 1 ( N , N − 1 ) = ( N − 1 ) ! [<xref ref-type="bibr" rid="scirp.99027-ref3">3</xref>]</p><p>F 1 ( N , M ) is actually the sum of the products of all M different numbers in [ 1 , n − 1 ] , from the definition (3.1) F 1 ( N , M ) = ∑ M I N ( P X ) * C ( N , I D X ( P X ) ) , the summation traversal all PX of PM = M.</p><p>There are 2<sup>M</sup><sup>−</sup><sup>1</sup> items in the expansion, and the exponent is from M + 1 to 2M</p><p>F 1 ( N , 0 ) = C ( N , 0 )</p><p>F 1 ( N , 1 ) = 1 ! * C ( N , 2 )</p><p>F 1 ( N , 2 ) = 2 ! * C ( N , 3 ) + 1 * 3 * C ( N , 4 )</p><p>F 1 ( N , 3 ) = 3 ! * C ( N , 4 ) + 1 * 3 * 4 * C ( N , 5 ) + 1 * 2 * 4 * C ( N , 5 )     + 1 * 3 * 5 * C ( N , 6 )</p><p>F 1 ( N , 4 ) = 4 ! * C ( N , 5 ) + 1 * 3 * 4 * 5 * C ( N , 6 ) + 1 * 2 * 4 * 5 * C ( N , 6 )     + 1 * 3 * 5 * 6 * C ( N , 7 ) + 1 * 2 * 3 * 5 * C ( N , 6 )     + 1 * 3 * 4 * 6 * C ( N , 7 ) + 1 * 2 * 4 * 6 * C ( N , 7 )     + 1 * 3 * 5 * 7 * C ( N , 8 )</p><p>F 1 ( N , 5 ) = 5 ! * C ( N , 6 ) + 1 * 3 * 4 * 5 * 6 * C ( N , 7 ) + 1 * 2 * 4 * 5 * 6 * C ( N , 7 )     + 1 * 3 * 5 * 6 * 7 * C ( N , 8 ) + 1 * 2 * 3 * 5 * 6 * C ( N , 7 )     + 1 * 3 * 4 * 6 * 7 * C ( N , 8 ) + 1 * 2 * 4 * 6 * 7 * C ( N , 8 )     + 1 * 3 * 5 * 7 * 8 * C ( N , 9 ) + 4 ! * 6 * C ( N , 7 )</p><p>  + 1 * 3 * 4 * 5 * 7 * C ( N , 8 ) + 1 * 2 * 4 * 5 * 7 * C ( N , 8 )   + 1 * 3 * 5 * 6 * 8 * C ( N , 9 ) + 1 * 2 * 3 * 5 * 7 * C ( N , 8 )   + 1 * 3 * 4 * 6 * 8 * C ( N , 9 ) + 1 * 2 * 4 * 6 * 8 * C ( N , 9 )   + 1 * 3 * 5 * 7 * 9 * C ( N , 10 )</p><p>F 1 ( N , 6 ) = 6 ! * C ( N , 7 ) + 1 * 3 * 4 * 5 * 6 * 7 * C ( N , 8 )     + 1 * 2 * 4 * 5 * 6 * 7 * C ( N , 8 ) + 1 * 3 * 5 * 6 * 7 * 8 * C ( N , 9 )     + 1 * 2 * 3 * 5 * 6 * 7 * C ( N , 8 ) + 1 * 3 * 4 * 6 * 7 * 8 * C ( N , 9 )     + 1 * 2 * 4 * 6 * 7 * 8 * C ( N , 9 ) + 1 * 3 * 5 * 7 * 8 * 9 * C ( N , 10 )     + 4 ! * 6 * 7 * C ( N , 8 ) + 1 * 3 * 4 * 5 * 7 * 8 * C ( N , 9 )</p><p>  + 1 * 2 * 4 * 5 * 7 * 8 * C ( N , 9 ) + 1 * 3 * 5 * 6 * 8 * 9 * C ( N , 10 )   + 1 * 2 * 3 * 5 * 7 * 8 * C ( N , 9 ) + 1 * 3 * 4 * 6 * 8 * 9 * C ( N , 10 )   + 1 * 2 * 4 * 6 * 8 * 9 * C ( N , 10 ) + 1 * 3 * 5 * 7 * 9 * 10 * C ( N , 11 )   + 5 ! * 7 * C ( N , 8 ) + 1 * 3 * 4 * 5 * 6 * 8 * C ( N , 9 )   + 1 * 2 * 4 * 5 * 6 * 8 * C ( N , 9 ) + 1 * 3 * 5 * 6 * 7 * 9 * C ( N , 10 )</p><p>  + 1 * 2 * 3 * 5 * 6 * 8 * C ( N , 9 ) + 1 * 3 * 4 * 6 * 7 * 9 * C ( N , 10 )   + 1 * 2 * 4 * 6 * 7 * 9 * C ( N , 10 ) + 1 * 3 * 5 * 7 * 8 * 10 * C ( N , 11 )   + 4 ! * 6 * 8 * C ( N , 9 ) + 1 * 3 * 4 * 5 * 7 * 9 * C ( N , 10 )</p><p>  + 1 * 2 * 4 * 5 * 7 * 9 * C ( N , 10 ) + 1 * 3 * 5 * 6 * 8 * 10 * C ( N , 11 )   + 1 * 2 * 3 * 5 * 7 * 9 * C ( N , 10 ) + 1 * 3 * 4 * 6 * 8 * 10 * C ( N , 11 )   + 1 * 2 * 4 * 6 * 8 * 10 * C ( N , 11 ) + 1 * 3 * 5 * 7 * 9 * 11 * C ( N , 12 )</p><p>It can be verified by reference [<xref ref-type="bibr" rid="scirp.99027-ref4">4</xref>].</p><p>(3.2) F 1 ( N , M ) = L A F 1 ( N , M − 1 ) + L B F 1 ( N , M − 1 ) = ( L A + L B ) M − 1 F 1 ( n , 1 )</p><p>Proof:</p><p>From the property of S 1 ( n , k ) [<xref ref-type="bibr" rid="scirp.99027-ref5">5</xref>]</p><p>→ F 1 ( N , M ) = ( N − 1 ) * F 1 ( N − 1 , M − 1 ) + F 1 ( N − 1 , M )</p><p>→ F 1 ( N , M ) = ∑ n = 0 N − 1 n * F 1 ( N − 1 , M )</p><p>Then it can be proved by (5).</p><p>q.e.d.</p><p>It can be understood as: Each product of F 1 ( N , M ) = (Product of the first M-1 factors) &#215; (Factor M).</p><p>Assuming the catalog of first M-1 factors is PX, then</p><p>L<sub>A</sub> means PX + A, no new discontinuity is generated;</p><p>L<sub>B</sub> means PX + B, new discontinuity is generated.</p><p>From (3.2), even if there is no concept of Shape of numbers, we can get the expansion.</p><p>Method 1: recursive method</p><p>1: list F 1 ( N , M − 1 ) , change</p><p>new exponent = (Original exponent) + 1, new coefficient = (Original coefficient) &#215; (Original exponent)</p><p>that is L A F 1 ( N , M − 1 ) .</p><p>2: list F 1 ( N , M − 1 ) again, change</p><p>new exponent = (Original exponent) +2, new coefficient = (Original coefficient) &#215; (Original exponent + 1)</p><p>that is L B F 1 ( N , M − 1 ) .</p><p>Method 2: direct method</p><p>The expansion of ( L A + L B ) M − 1 is similar to ( A + B ) M − 1 without commutative. Coefficient changes according to the arrangement of A and B, begin from 1 and from left to right:</p><p>in case of A, the coefficient has a factor + 1,</p><p>in case of B, the coefficient has a factor + 2.</p><p>Items, coefficient and exponent are all clear.</p><p>For example:</p><p>( A + B ) 3 = A A A + ( A A B + A B A + B A A ) + ( A B B + B A B + B B A ) + B B B</p><p>→ F 1 ( N , 4 ) = 1 * 2 * 3 * 4 * C ( N , 5 )     + ( 1 * 2 * 3 * 5 + 1 * 2 * 4 * 5 + 1 * 3 * 4 * 5 ) * C ( N , 6 )     + ( 1 * 2 * 4 * 6 + 1 * 3 * 4 * 6 + 1 * 3 * 5 * 6 ) * C ( N , 7 )     + 1 * 3 * 5 * 7 * C ( N , 8 )</p></sec><sec id="s4"><title>4. The Recursive Calculation Formula of S2(n, n − k)</title><p>Definition 4.1. F 2 ( N , M ) = S 2 ( N , N − M ) , specify F 2 ( N , M ) = 0   ( N &lt; M )</p><p>Already know F 2 ( N , 0 ) = S 2 ( N , N ) = 1 ; F 2 ( N , 1 ) = S 2 ( N , N − 1 ) = C ( N , 2 ) [<xref ref-type="bibr" rid="scirp.99027-ref6">6</xref>].</p><p>When M &gt; 5, it’s difficult to solve it with combination method.</p><p>(4.1) F 2 ( N , M ) = ∑ n = 0 N − 1 ( n − M ) * F 2 ( n − 1 , M − 1 )</p><p>Proof:</p><p>Already know S 2 ( N , M ) = S 2 ( N − 1 , M − 1 ) + M ∗ S 2 ( N − 1 , M ) [<xref ref-type="bibr" rid="scirp.99027-ref7">7</xref>]</p><p>F 2 ( N , M ) = S 2 ( N , N − M ) = ( N − M ) * S 2 ( N − 1 , N − M ) + S 2 ( N − 1 , N − M − 1 ) = ( N − M ) * S 2 ( N − 1 , ( N − 1 ) − ( M − 1 ) ) + S 2 ( N − 1 , ( N − 1 ) − M ) = ( N − M ) * F 2 ( N − 1 , M − 1 ) + F 2 ( N − 1 , M )</p><p>(4.2) F 2 ( N , M ) = L A F 2 ( N , M − 1 ) + L B F 2 ( N , M − 1 ) − M * ∑ F 2 ( N , M − 1 )</p><p>The proof process is the same as similar to (5).</p><p>This is the recursive method:</p><p>Exponent is from M + 1 to 2M,</p><p>Coefficientofexponent K in F 2 ( N , M ) = { Coefficientofexponent K − 1in F 2 ( N , M − 1 ) } * ( K − M )       + { Coefficientofexponent K − 2in F 2 ( N , M − 1 ) } * ( K − 1 )</p><p>F 2 ( N , 0 ) = C ( N , 0 )</p><p>F 2 ( N , 1 ) = C ( N , 2 )</p><p>F 2 ( N , 2 ) = C ( N , 3 ) + 3 * C ( N , 4 )</p><p>F 2 ( N , 3 ) = C ( N , 4 ) + 10 * C ( N , 5 ) + 15 * C ( N , 6 )</p><p>F 2 ( N , 4 ) = C ( N , 5 ) + 25 * C ( N , 6 ) + 105 * C ( N , 7 ) + 105 * C ( N , 8 )</p><p>F 2 ( N , 5 ) = C ( N , 6 ) + 56 * C ( N , 7 ) + 490 * C ( N , 8 )     + 1260 * C ( N , 9 ) + 945 * C ( N , 10 )</p><p>F 2 ( N , 6 ) = C ( N , 7 ) + 119 * C ( N , 8 ) + 1918 * C ( N , 9 ) + 9450 * C ( N , 10 )     + 17325 * C ( N , 11 ) + 10395 * C ( N , 12 )</p><p>Among: 119 = 56 * ( 8 − 6 ) + 1 * 7 , 1918 = 490 * ( 9 − 6 ) + 56 * 8 , 17325 = 945 * ( 10 − 5 ) + 1260 * 10 , 10395 = 0 + 945 * 11</p><p>F 2 ( N , 7 ) = C ( N , 8 ) + 246 * C ( N , 9 ) + 6825 * C ( N , 10 ) + 56980 * C ( N , 11 )     + 190575 * C ( N , 12 ) + 270270 * C ( N , 13 ) + 135135 * C ( N , 14 )</p><p>Among: 190575 = 17325 * ( 12 − 7 ) + 9450 * 11 , 270270 = 10395 * ( 13 − 7 ) + 17325 * 12 , 135135 = 10395 * 13</p><p>F 2 ( N , 8 ) = C ( N , 9 ) + 501 * C ( N , 10 ) + 22935 * C ( N , 11 ) + 302995 * C ( N , 12 )     + 1636635 * C ( N , 13 ) + 4099095 * C ( N , 14 )     + 4729725 * C ( N , 15 ) + 2027025 * C ( N , 16 )</p><p>Among: 302995 = 56980 * ( 12 − 8 ) + 6825 * 11 , 4729725 = 135135 * ( 15 − 8 ) + 270270 * 14 , 2027025 = 135135 * 15</p><p>It can be verified by reference [<xref ref-type="bibr" rid="scirp.99027-ref7">7</xref>] [<xref ref-type="bibr" rid="scirp.99027-ref8">8</xref>].</p></sec><sec id="s5"><title>5. Simple Analysis of the Shape of Numbers</title><p>(5.1) Items of F 1 ( N , M ) are divided into 2 M − 1 categories according to PX, and according to PB (from 0 to M = 1), they can be divided into PB families.</p><p>Count of per family |{PX:PB is same}| = C ( M − 1 , P B ) , | P X | = C ( N − M , P B + 1 ) , | E N D ( N , P X ) | = C ( N − M − 1 , P B )</p><p>Proof:</p><p>If PB = 0, find M consecutive numbers from 1 to N − 1 is equivalent to finding 1 number from 1 to N − M.</p><p>| P X | = N − M = C ( N − M , 1 )</p><p>If PB = 1, {PX} with the same PB has the same |PX|, we can only calculate | B A M − 2 | .</p><p>Items begin with Number 1: 1 &#215; 3 …, 1 &#215; 4 …, equivalent to finding M − 1 consecutive numbers from 3 to n − 1,</p><p>| ItemsbeginwithNumber1 | = ( N − 2 ) − ( M − 1 ) = N − M − 1</p><p>Items begin with Number 2: 2 &#215; 4 …, 2 &#215; 5 …, equivalent to finding M − 1 consecutive numbers from 4 to n − 1,</p><p>| ItemsbeginwithNumber2 | = ( N − 3 ) − ( M − 1 ) = N − M − 2</p><p>So | P X | = ∑ i = 1 N − M − 1 C ( N − M − i , 1 ) = C ( N − M , 2 ) .</p><p>It can be proved by mathematical induction | P X | = ∑ i = 1 N − M − P B C ( N − M − i , P B ) = C ( N − M , P B + 1 )</p><p>Verification:</p><p>C ( M − 1 , 0 ) + C ( M − 1 , 1 ) + ⋯ + C ( M − 1 , M − 1 ) = 2 M − 1 (10)</p><p>∑ P B = 0 M − 1 C ( M − 1 , P B ) * C ( N − M , P B + 1 ) = ∑ P B = 0 M − 1 C ( M − 1 , P B ) * C ( N − M , ( N − M ) − ( P B + 1 ) ) = ∑ P B = 0 M − 1 C ( M − 1 , P B ) * C ( N − M , N − P A ) = ∑ P B = 0 M − 1 C ( M − 1 , P A ) * C ( N − M , N − P A ) = C ( N − 1 , M ) (11)</p><p>Among: C ( M − 1 , P B ) = Count of PX with the same PB, C ( N − M , P B + 1 ) = | P X | , C ( N − 1 , M ) = Count of items of F 1 ( N , M ) .</p><p>(5.2) ∑ E N D ( I d x + 1 , P X ) = M i n * I d x , S U M ( I d x + 1 , P X ) = M i n * ( I d x + 1 )</p><p>This can be directly calculated by (2.2), and can be proved by mathematical induction.</p><p>Proof:</p><p>P X = A , ∑ E N D ( I D X ( A ) + 1 , A ) = 2 * 3 = ( 1 * 2 ) * 3 = M I N ( A ) * I D X (A)</p><p>P X = B , ∑ E N D ( I D X ( B ) + 1 , B ) = 1 * 4 + 2 * 4 = ( 1 * 3 ) * 4 = M I N ( B ) * I D X (B)</p><p>∑ E N D ( I d x + 1 , P X ) = M i n * I d x . Note that end items have the same maximum factor, form (8) (9)</p><p>∑ E N D ( I d x A + 1 , P X + A ) = ∑ E N D ( I d x A , P X ) * I d x A = M i n * I d x * I d x A = M i n A * I d x A</p><p>∑ E N D ( I d x B + 1 , P X + B ) = S U M ( I d x + 1 , P X ) * I d x B = M i n * ( I d x + 1 ) * I d x B = M i n B * I d x B</p><p>q.e.d.</p><p>Direct calculation:</p><p>(5.3) Average of S U M ( N , P X ) = M i n * C ( N , P M ) / C ( I d x , P M ) ; Average of ∑ E N D ( N , P X ) = M i n * C ( N − 1 , P M ) / C ( I d x − 1 , P M )</p><p>(5.4) M i n A = S U M ( I d x + 1 , P X ) − M i n , M i n B = S U M ( I d x + 1 , P X )</p><p>(5.5) S U M ( H * I d x − 1 , P X ) = ( H − 1 ) * ∑ E N D ( H * I d x , P X )</p><p>Gauss computing 1 + 2 + ⋯ + ( N − 1 ) use the method of adding the first and last two terms:</p><p>( 1 + N − 1 ) + ( 2 + N − 2 ) + ⋯ = N * ( N − 1 ) / 2 , where N is the sum of each group, ( N − 1 ) / 2 is the count of groups.</p><p>This is a similar way: Take ∑ E N D ( N , P X ) as a whole, select H &#215; Idx items, sum from small to large, where (H − 1) is similar to count of groups, ∑ E N D ( H * I d x , P X ) is similar to the sum of a group.</p><p>For example:</p><p>1 + 2 + 3 + 4 + 5 + 6 + ⋯ = ( 1 + 2 ) + 3 + 4 + 5 + 6 + ⋯ = 3 * 1 + ( 3 + 4 + 5 + 6 + … ) = ( 1 + 2 + 3 + 4 ) + ( 5 + 6 + ⋯ ) = 5 * 2 + ( 5 + 6 + ⋯ )</p><p>1 * 2 + 2 * 3 + 3 * 4 + 4 * 5 + 5 * 6 + ⋯ = ( 1 * 2 + 2 * 3 + 3 * 4 ) + 4 * 5 + 5 * 6 + ⋯ = 4 * 5 + ( 4 * 5 + 5 * 6 + ⋯ )</p><p>(5.6) S U M ( N , P X ) ≡ ∑ E N D ( N , P X ) ≡ 0 MOD M i n</p><p>(5.7) When N increases, S u m ( N , P X ) with the same PM and PB increases proportionally, regardless of N</p><p>For example:</p><p>S U M ( N , A A B ) : S U M ( N , A B A ) : S U M ( N , B A A ) = M I N ( A A B ) : M I N ( A B A ) : M I N ( B A A )</p><p>(5.8) For prime number P, S U M ( P , P X ) ≡ 0 MOD P * M i n , ( I d x &lt; P )</p><p>From number theory we know F 1 ( P , M ) ≡ 0 MOD P , ( M &lt; P − 1 ) [<xref ref-type="bibr" rid="scirp.99027-ref9">9</xref>] [<xref ref-type="bibr" rid="scirp.99027-ref10">10</xref>], this is its promotion.</p><p>For example:</p><p>F 1 ( 5 , 2 ) = 1 * 2 + 2 * 3 + 3 * 4 + 1 * 3 + 1 * 4 + 2 * 4 ≡ 0 MOD5</p><p>1 * 2 + 2 * 3 + 3 * 4 ≡ 0 MOD5 * 1 * 2 , 1 * 3 + 1 * 4 + 2 * 4 ≡ 0 MOD5 * 1 * 3</p><p>(5.9) {PX} with the same PM and PB, PB &gt; 0, IDX(PX) = P, P &gt; 3, then ∑ M I N ( P X ) ≡ 0 MOD P * ( P − 1 )</p><p>Proof:</p><p>F 1 ( P , M ) ≡ 0 MOD P , all items of the expansion have the factor C ( P , I d x ) .</p><p>If Idx &gt; P then Sum ( P , P X ) = 0 , if Idx &lt; P then P | S u m ( P , P X ) → P | ∑ S u m ( P , P X ) , Idx = P.</p><p>For example:</p><p>A B B , B A B , B B A → 1 * 2 * 4 * 6 + 1 * 3 * 4 * 6 + 1 * 3 * 5 * 6 = 5 * 6 * 7 ≡ 0 MOD7 * 6</p><p>A A A B , A A B A , A B A A , B A A A → 1 * 2 * 3 * 4 * 6 + 1 * 2 * 3 * 5 * 6 + 1 * 2 * 4 * 5 * 6 + 1 * 3 * 4 * 5 * 6 ≡ 0 MOD7 * 6</p><p>(5.10) For prime number P, F 1 ( P − 1 , M ) ≡ 1 MOD P ( 0 ≤ M &lt; P − 2 )</p><p>Proof:</p><p>F 1 ( P − 1 , 0 ) = 1 ≡ 1 MOD P , F 1 ( P − 1 , 1 ) = ( P − 1 ) ( P − 2 ) / 2 ≡ ( − 1 ) * ( − 2 ) / 2 ≡ 1 MOD P</p><p>From mathematical induction, if F 1 ( P − 1 , M − 1 ) ≡ 1MODP , ( 0 ≤ M &lt; P − 2 )</p><p>F 1 ( P , M ) = ( P − 1 ) F 1 ( P − 1 , M − 1 ) + F 1 ( P − 1 , M ) ≡ ( P − 1 ) + F 1 ( P − 1 , M ) ≡ − 1 + F 1 ( P − 1 , M ) ≡ 0   MOD   P</p><p>→ F 1 ( P − 1 , M ) ≡ 1   MOD   P ( 0 ≤ M &lt; P − 2 )</p></sec><sec id="s6"><title>6. Conclusions</title><p>In this paper, the concept of Shape of numbers and two new operators were introduced, and through simple way, mainly mathematical induction, the calculation formulas of Shape of numbers were obtained. Just as a simple corollary, calculation formulas of S 1 ( N , N − K ) , S 2 ( N − K ) are obtained. And we get some properties of Shape of numbers, especially the new congruence relation from Equations (5.8) and (5.9).</p></sec><sec id="s7"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s8"><title>Cite this paper</title><p>Peng, J. (2020) Shape of Numbers and Calculation Formula of Stirling Numbers. Open Access Library Journal, 7: e6081. https://doi.org/10.4236/oalib.1106081</p></sec></body><back><ref-list><title>References</title><ref id="scirp.99027-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Liu, Y. and Liu, X.S. (2006) Combinatorial Mathematics. Peking University Press, Beijing.</mixed-citation></ref><ref id="scirp.99027-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Hua, L.G. (1957) Number Theory Guidance. Science Press, Beijing.</mixed-citation></ref><ref id="scirp.99027-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Tuo, N., Gao, L. and Cai, J.X. (2010) Two Formulas of Stirling Number of the First Kind. Journal of Yan’an University (Natural Science Edition), 3, 4-6.</mixed-citation></ref><ref id="scirp.99027-ref4"><label>4</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Xu</surname><given-names> C.N. </given-names></name>,<etal>et al</etal>. (<year>2013</year>)<article-title>Operator Proof of Recurrence Formula of Stirling Number of the First Kind</article-title><source> Journal of Inner Mongolia University for the Nationalities (Natural Sciences)</source><volume> 4</volume>,<fpage> 384</fpage>-<lpage>385</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.99027-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Bruald, R.A. (2004) Combinatorial Mathematics. 3rd Edition, China Machine Press, Beijing. (S. X. Feng et al., translation)</mixed-citation></ref><ref id="scirp.99027-ref6"><label>6</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Zhang</surname><given-names> F.L. </given-names></name>,<etal>et al</etal>. (<year>2011</year>)<article-title>A Property of Stirling Number of the Second Kind</article-title><source> Journal of Weinan Teachers College</source><volume> 12</volume>,<fpage> 14</fpage>-<lpage>16</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.99027-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Wu, Y.S. (2008) A Formula for the Second Kind of Stirling Number S2(n, n - 6). Journal of East China Jiaotong University, No. 4, 97-99.</mixed-citation></ref><ref id="scirp.99027-ref8"><label>8</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Li</surname><given-names> M.S. </given-names></name>,<etal>et al</etal>. (<year>2009</year>)<article-title>A Formula of Stirling Number S(n, n - 7)</article-title><source> Journal of Guangdong Polytechnic Normal University</source><volume> 3</volume>,<fpage> 16</fpage>-<lpage>18</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.99027-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Hardy, G.H. (2010) An Introduction to the Theory of Numbers. 6th Edition, People’s Post and Telecommunications Press, Beijing. (F. Zhang, translation)</mixed-citation></ref><ref id="scirp.99027-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Pan, C.D. and Pan, C.B. (2013) Elementary Number Theory. 3rd Edition, Peking University Press, Beijing.</mixed-citation></ref></ref-list></back></article>