{"id":1030,"date":"2018-01-19T11:41:39","date_gmt":"2018-01-19T11:41:39","guid":{"rendered":"http:\/\/mathscitech.org\/articles\/?p=1030"},"modified":"2023-08-28T20:10:04","modified_gmt":"2023-08-28T19:10:04","slug":"finite-summations-3","status":"publish","type":"post","link":"https:\/\/mathscitech.org\/articles\/finite-summations-3","title":{"rendered":"Sum of Integer Powers (Part 3)"},"content":{"rendered":"<p><strong>(Discrete Mathematics Techniques III)<\/strong><\/p>\n<p><em>1st ed. Apr 2nd, 2010<\/em><\/p>\n<p><strong>Abstract<\/strong><br \/>\nThis is the last in the 3-part series of articles on finding for oneself the solution to the sum of integer power problem, and in the process discovering the Bernoulli numbers.  In <strong>Part 3 (this paper)<\/strong>, we find a <strong>direct<\/strong> closed-form solution, i.e. one that does <strong>not<\/strong> require iteration, for the general case of the finite-summation-of-integer-powers problem <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_p%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5E%7BN%7D+k%5Ep&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_p(N) = \\sum_{k=1}^{N} k^p' title='S_p(N) = \\sum_{k=1}^{N} k^p' class='latex' \/>.  Having established in <a href=\"finite-summations-2\">Part 2<\/a> that the closed-form solution is a polynomial, the summation is here rewritten as the sum of the <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p+1' title='p+1' class='latex' \/> independent monomials <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_j+N%5Ej&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_j N^j' title='a_j N^j' class='latex' \/> (<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=1+%5Cleq+j+%5Cleq+p%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='1 \\leq j \\leq p+1' title='1 \\leq j \\leq p+1' class='latex' \/>), where the <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_j' title='a_j' class='latex' \/> are unknown coefficients.  Using the recurrence relation <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_p%28N%2B1%29+%3D+S_p%28N%29+%2B+%28N%2B1%29%5Ep&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_p(N+1) = S_p(N) + (N+1)^p' title='S_p(N+1) = S_p(N) + (N+1)^p' class='latex' \/>, we obtain a linear combination of the monomials, which reduces to an easily solvable <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%28p%2B1%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(p+1)' title='(p+1)' class='latex' \/>-by-<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%28p%2B1%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(p+1)' title='(p+1)' class='latex' \/> triangular linear system in the unknown coefficients <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_j' title='a_j' class='latex' \/> of the closed-form polynomial solution.  <a href=\"maxima\">Maxima<\/a> and Octave\/Matlab codes for <a href=\"finite-summations-3#AppendixB\">directly computing<\/a> the closed-form solutions are included in the <a href=\"finite-summations-3#AppendixB\">Appendices<\/a>.<\/p>\n<p>A lovely paper by <a href=\"https:\/\/t.co\/a6wJ6DZqLe?amp=1\" rel=\"noopener noreferrer\" target=\"_blank\">Bearden (March 1996, American Mathematical Monthly)<\/a>, which was shared with me by a reader, tells the mathematical story nicely, with much of the history filled in.<\/p>\n<p>\n <!--more--><\/p>\n<hr>\n<p><strong><em>NOTE: This paper contains many formulas.  As such, you may prefer reading the paper as a <a href=\"http:\/\/mathscitech.org\/papers\/ebrahim-sum-powers-3.pdf\">typeset PDF<\/a><\/em><\/strong>.<\/p>\n<hr>\n<p>\n<h3>Finding a Closed-Form solution for <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_p%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5EN+k%5Ep&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_p(N) = \\sum_{k=1}^N k^p' title='S_p(N) = \\sum_{k=1}^N k^p' class='latex' \/> using a Direct Method<\/h3>\n<p><h4>Motivation<\/h4>\n<p>\n Our goal is to obtain, without using iteration, a closed form solution for the general case of the finite-summation-of-integer-powers problem:<br \/>\n <a name=\"spn\"><\/p>\n<p align=center>\n <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_p%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5EN+k%5Ep%2C+%5Cmbox%7B+%28where+%7D+p+%5Cin+%5Cmathbb%7BN%7D+%3D+%5C%7B0%2C1%2C2%2C%5Cldots%5C%7D%3B+N%5Cgeq0%29+%5C+%5C+%5C+%5C+%5C+%281%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_p(N) = \\sum_{k=1}^N k^p, \\mbox{ (where } p \\in \\mathbb{N} = \\{0,1,2,\\ldots\\}; N\\geq0) \\ \\ \\ \\ \\ (1)' title='\\displaystyle S_p(N) = \\sum_{k=1}^N k^p, \\mbox{ (where } p \\in \\mathbb{N} = \\{0,1,2,\\ldots\\}; N\\geq0) \\ \\ \\ \\ \\ (1)' class='latex' \/><\/p>\n<p><\/a> Recall that in <a href=\"finite-summations-2\">Part 2 of this paper<\/a> <a href=\"#Ebrahim\/Sumkp2\" name=\"CITEEbrahim\/Sumkp2\"><\/a>, we used a method of recurrence relations to obtain the following results about <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_p%28N%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_p(N)' title='S_p(N)' class='latex' \/>: <\/p>\n<ol>\n<li> <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_p%28N%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_p(N)' title='S_p(N)' class='latex' \/> may be expressed as a linear recurrence relation that uses the <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p-1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p-1' title='p-1' class='latex' \/> lower order formulas <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_j%28N%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_j(N)' title='S_j(N)' class='latex' \/> and <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_j%28N-1%29%2C+%5C+%5C+%28j+%3D+1%2C%5Cldots%2Cp-1%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_j(N-1), \\ \\ (j = 1,\\ldots,p-1)' title='S_j(N-1), \\ \\ (j = 1,\\ldots,p-1)' class='latex' \/> as follows:<br \/>\n<a name=\"spnsol\"><\/p>\n<p align=center>\n<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_p%28N%29+%3D+%5Cfrac%7B1%7D%7B1%2B%5Calpha_p%7D%5Cleft%5C%7BN%5E2+%2B+N%5Ep+%2B+%5Csum_%7Bj%3D1%7D%5E%7Bp-1%7D+C_j%28N%29+S_j%28N-1%29+-+%5Csum_%7Bj%3D1%7D%5E%7Bp-1%7D+%5Calpha_j+S_j%28N%29+%5Cright%5C%7D%2C+%5C+%5C+%5C+%5C+%5C+%282%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_p(N) = \\frac{1}{1+\\alpha_p}\\left\\{N^2 + N^p + \\sum_{j=1}^{p-1} C_j(N) S_j(N-1) - \\sum_{j=1}^{p-1} \\alpha_j S_j(N) \\right\\}, \\ \\ \\ \\ \\ (2)' title='\\displaystyle S_p(N) = \\frac{1}{1+\\alpha_p}\\left\\{N^2 + N^p + \\sum_{j=1}^{p-1} C_j(N) S_j(N-1) - \\sum_{j=1}^{p-1} \\alpha_j S_j(N) \\right\\}, \\ \\ \\ \\ \\ (2)' class='latex' \/>.<\/p>\n<p><\/a><br \/>\nThe <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Calpha_j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\alpha_j' title='\\alpha_j' class='latex' \/> in (2) are the coefficients from the <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%28p-1%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='(p-1)' title='(p-1)' class='latex' \/>-st polynomial solution <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_%7Bp-1%7D%28N%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_{p-1}(N)' title='S_{p-1}(N)' class='latex' \/>, while the terms <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=C_j%28N%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='C_j(N)' title='C_j(N)' class='latex' \/> are defined in terms of binomial coefficients<sup class='footnote'><a href='#fn-1030-1' id='fnref-1030-1' onclick='return fdfootnote_show(1030)'>1<\/a><\/sup> as:<\/p>\n<p align=center>\n<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+C_j%28N%29+%3D+%5Cleft%5B%5Cbinom%7Bp-1%7D%7Bj%7DN+-+%5Cbinom%7Bp-1%7D%7Bj-1%7D%5Cright%5D.&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle C_j(N) = \\left[\\binom{p-1}{j}N - \\binom{p-1}{j-1}\\right].' title='\\displaystyle C_j(N) = \\left[\\binom{p-1}{j}N - \\binom{p-1}{j-1}\\right].' class='latex' \/><\/p>\n<p><li> The closed form solution of <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_p%28N%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_p(N)' title='S_p(N)' class='latex' \/> is a polynomial in <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=N&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='N' title='N' class='latex' \/> of degree <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p+1' title='p+1' class='latex' \/> with rational coefficients and a constant term equal to zero.\n<\/ol>\n<p>\n While the expression for <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_p%28N%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_p(N)' title='S_p(N)' class='latex' \/> in <a href=\"#spnsol\">(2)<\/a> is indeed accurate, it requires repeated iteration to obtain the closed form expression for any particular <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/>. Such an approach without the assistance of a computer algebra system such as <a href=\"maxima\">Maxima<\/a><sup class='footnote'><a href='#fn-1030-2' id='fnref-1030-2' onclick='return fdfootnote_show(1030)'>2<\/a><\/sup> would be prohibitively time-consuming and prone to error. <\/p>\n<p>We are hence left with the following question:  <\/p>\n<blockquote><p>Can we find a closed-form solution for the coefficients of the general solution polynomial that can be obtained <em>directly<\/em>, i.e. that does not require iteration?<\/p><\/blockquote>\n<p>This paper uses linear algebra and matrices to achieve precisely this goal.<\/p>\n<p>\n<h3>The Direct Approach<\/h3>\n<p><h4> Polynomial with Undetermined Coefficients <\/h4>\n<p> Since we have established in <a href=\"#spnsol\">(2)<\/a> that <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_p%28N%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_p(N)' title='S_p(N)' class='latex' \/> is a polynomial of order <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p+1' title='p+1' class='latex' \/> with no constant term, we may write down the closed form solution of <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_p%28N%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_p(N)' title='S_p(N)' class='latex' \/> in the form:<br \/>\n <a name=\"spn_poly\"><\/p>\n<p align=center>\n <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_p%28N%29+%3A%3D+%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7D+a_j+N%5Ej%5C+%5C+%5C+%5C+%5C+%283%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_p(N) := \\sum_{j=1}^{p+1} a_j N^j\\ \\ \\ \\ \\ (3)' title='\\displaystyle S_p(N) := \\sum_{j=1}^{p+1} a_j N^j\\ \\ \\ \\ \\ (3)' class='latex' \/><\/p>\n<p><\/a> where <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_j%2C+%5C+%28j+%3D+1%2C%5C+2%2C%5C+%5Cldots%2C%5C+p%2B1%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_j, \\ (j = 1,\\ 2,\\ \\ldots,\\ p+1)' title='a_j, \\ (j = 1,\\ 2,\\ \\ldots,\\ p+1)' class='latex' \/>, are coefficients that have yet to be determined. As a first step towards determining these coefficients, observe that every finite summation can be written as a first order recurrence in <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=N&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='N' title='N' class='latex' \/> by peeling off the last summand:<br \/>\n<a name=\"spn_rec\"><\/p>\n<p align=center>\n<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_p%28N%2B1%29+%3D+S_p%28N%29+%2B+%28N%2B1%29%5Ep.%5C+%5C+%5C+%5C+%5C+%284%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_p(N+1) = S_p(N) + (N+1)^p.\\ \\ \\ \\ \\ (4)' title='\\displaystyle S_p(N+1) = S_p(N) + (N+1)^p.\\ \\ \\ \\ \\ (4)' class='latex' \/><\/p>\n<p><\/a> Substituting <a href=\"#spn_poly\">(3)<\/a> into <a href=\"#spn_rec\">(4)<\/a> gives:<br \/>\n<a name=\"spn_sysraw\"><\/p>\n<p align=center>\n<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7Da_j+%28N%2B1%29%5Ej+%3D+%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7D+a_j+N%5Ej+%2B+%28N%2B1%29%5Ep.%5C+%5C+%5C+%5C+%5C+%285%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle \\sum_{j=1}^{p+1}a_j (N+1)^j = \\sum_{j=1}^{p+1} a_j N^j + (N+1)^p.\\ \\ \\ \\ \\ (5)' title='\\displaystyle \\sum_{j=1}^{p+1}a_j (N+1)^j = \\sum_{j=1}^{p+1} a_j N^j + (N+1)^p.\\ \\ \\ \\ \\ (5)' class='latex' \/><\/p>\n<p><\/a><\/p>\n<p>\n<h4> Summation Manipulations <\/h4>\n<p>\n What follows is a sequence of summation manipulations<sup class='footnote'><a href='#fn-1030-3' id='fnref-1030-3' onclick='return fdfootnote_show(1030)'>3<\/a><\/sup> and simplifications of <a href=\"#spn_sysraw\">(5)<\/a> aimed at obtaining an expression from which a closed-form solution for the coefficicents <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_%7Bj%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_{j}' title='a_{j}' class='latex' \/> becomes transparent:<\/p>\n<ul>\n<li> Expand the binomial powers using the binomial formula on both the left-hand side (LHS) and right-hand side (RHS) of <a href=\"#spn_sysraw\">(5)<\/a>:<br \/>\n<a name=\"spn_manip1\"><\/p>\n<p align=center>\n <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle++%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7Da_j+%5Csum_%7Bi%3D0%7D%5Ej+%5Cbinom%7Bj%7D%7Bi%7DN%5Ei+%3D+%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7D+a_j+N%5Ej+%2B+%5Csum_%7Bj%3D0%7D%5Ep+%5Cbinom%7Bp%7D%7Bj%7DN%5Ej.+%5C+%5C+%5C+%5C+%5C+%286%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle  \\sum_{j=1}^{p+1}a_j \\sum_{i=0}^j \\binom{j}{i}N^i = \\sum_{j=1}^{p+1} a_j N^j + \\sum_{j=0}^p \\binom{p}{j}N^j. \\ \\ \\ \\ \\ (6)' title='\\displaystyle  \\sum_{j=1}^{p+1}a_j \\sum_{i=0}^j \\binom{j}{i}N^i = \\sum_{j=1}^{p+1} a_j N^j + \\sum_{j=0}^p \\binom{p}{j}N^j. \\ \\ \\ \\ \\ (6)' class='latex' \/><\/p>\n<p><\/a> <\/p>\n<li> Modify the LHS and RHS of <a href=\"#spn_manip1\">(6)<\/a> as follows, exploiting the fact that <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cbinom%7Bn%7D%7Bk%7D+%3D+0+%5Cmbox%7B+when+%7D+k%3En&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\binom{n}{k} = 0 \\mbox{ when } k&gt;n' title='\\binom{n}{k} = 0 \\mbox{ when } k&gt;n' class='latex' \/>:\n<ul>\n<li>LHS: Extend upper range of inner sum to match upper range of outer sum.\n<li>RHS: Peel off 0-index term and add a vacuous <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p+1' title='p+1' class='latex' \/>-index term to last sum.\n<li>Result:\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7Da_j+%5Csum_%7Bi%3D0%7D%5E%7Bp%2B1%7D+%5Cbinom%7Bj%7D%7Bi%7DN%5Ei+%3D+%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7D+a_j+N%5Ej+%2B+1+%2B+%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7D+%5Cbinom%7Bp%7D%7Bj%7DN%5Ej&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle \\sum_{j=1}^{p+1}a_j \\sum_{i=0}^{p+1} \\binom{j}{i}N^i = \\sum_{j=1}^{p+1} a_j N^j + 1 + \\sum_{j=1}^{p+1} \\binom{p}{j}N^j' title='\\displaystyle \\sum_{j=1}^{p+1}a_j \\sum_{i=0}^{p+1} \\binom{j}{i}N^i = \\sum_{j=1}^{p+1} a_j N^j + 1 + \\sum_{j=1}^{p+1} \\binom{p}{j}N^j' class='latex' \/><\/p>\n<\/ul>\n<li>\n<ul>\n<li>LHS: Interchange order of summations.\n<li>RHS: Combine terms.\n<li>Result:\n<p align=center>\n <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+%5Csum_%7Bi%3D0%7D%5E%7Bp%2B1%7D+N%5Ei+%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7Da_j+%5Cbinom%7Bj%7D%7Bi%7D+%3D+1+%2B+%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7D+%5Cleft%5Ba_j+%2B+%5Cbinom%7Bp%7D%7Bj%7DN%5Ej%5Cright%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle \\sum_{i=0}^{p+1} N^i \\sum_{j=1}^{p+1}a_j \\binom{j}{i} = 1 + \\sum_{j=1}^{p+1} \\left[a_j + \\binom{p}{j}N^j\\right]' title='\\displaystyle \\sum_{i=0}^{p+1} N^i \\sum_{j=1}^{p+1}a_j \\binom{j}{i} = 1 + \\sum_{j=1}^{p+1} \\left[a_j + \\binom{p}{j}N^j\\right]' class='latex' \/><\/p>\n<\/ul>\n<li>\n<ul>\n<li>LHS: Peel off 0-index term from the (now outside) summation on <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='i' title='i' class='latex' \/>.\n<li>RHS: Change dummy index variable.\n<li>Result:\n<p align=center>\n <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7Da_j+%2B+%5Csum_%7Bi%3D1%7D%5E%7Bp%2B1%7D+N%5Ei+%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7Da_j+%5Cbinom%7Bj%7D%7Bi%7D+%3D+1+%2B+%5Csum_%7Bi%3D1%7D%5E%7Bp%2B1%7D+%5Cleft%5Ba_i+%2B+%5Cbinom%7Bp%7D%7Bi%7DN%5Ei%5Cright%5D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle \\sum_{j=1}^{p+1}a_j + \\sum_{i=1}^{p+1} N^i \\sum_{j=1}^{p+1}a_j \\binom{j}{i} = 1 + \\sum_{i=1}^{p+1} \\left[a_i + \\binom{p}{i}N^i\\right]' title='\\displaystyle \\sum_{j=1}^{p+1}a_j + \\sum_{i=1}^{p+1} N^i \\sum_{j=1}^{p+1}a_j \\binom{j}{i} = 1 + \\sum_{i=1}^{p+1} \\left[a_i + \\binom{p}{i}N^i\\right]' class='latex' \/><\/p>\n<\/ul>\n<li> Bring everything over to the left-hand side to obtain a homogeneous linear combination of the monomials <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5C%7BN%5Ei%5C%7D_%7Bi%3D0%7D%5E%7Bp%2B1%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\{N^i\\}_{i=0}^{p+1}' title='\\{N^i\\}_{i=0}^{p+1}' class='latex' \/>:<br \/>\n <a name=\"spn_homo\"><\/p>\n<p align=center>\n <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle++-1+%2B+%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7Da_j+%2B+%5Csum_%7Bi%3D1%7D%5E%7Bp%2B1%7D+%5Cleft%5B%5Cleft%28%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7Da_j+%5Cbinom%7Bj%7D%7Bi%7D+%5Cright%29+-+a_i+-+%5Cbinom%7Bp%7D%7Bi%7D%5Cright%5D+N%5Ei+%3D+0+%5C+%5C+%5C+%5C+%5C+%287%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle  -1 + \\sum_{j=1}^{p+1}a_j + \\sum_{i=1}^{p+1} \\left[\\left(\\sum_{j=1}^{p+1}a_j \\binom{j}{i} \\right) - a_i - \\binom{p}{i}\\right] N^i = 0 \\ \\ \\ \\ \\ (7)' title='\\displaystyle  -1 + \\sum_{j=1}^{p+1}a_j + \\sum_{i=1}^{p+1} \\left[\\left(\\sum_{j=1}^{p+1}a_j \\binom{j}{i} \\right) - a_i - \\binom{p}{i}\\right] N^i = 0 \\ \\ \\ \\ \\ (7)' class='latex' \/><\/p>\n<p><\/a>\n<\/ul>\n<p><h4> Linear Independence Reveals Equations for Unknown Coefficients <\/h4>\n<p> Since the monomials <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5C%7BN%5Ei%5C%7D_%7Bi%3D0%7D%5E%7Bp%2B1%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\{N^i\\}_{i=0}^{p+1}' title='\\{N^i\\}_{i=0}^{p+1}' class='latex' \/> are a basis for the vector space <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cmathbb%7BP%7D_%7BN%2B1%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\mathbb{P}_{N+1}' title='\\mathbb{P}_{N+1}' class='latex' \/> of polynomials of degree less than or equal to <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=N%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='N+1' title='N+1' class='latex' \/>, <em>any linear combination of the <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5C%7BN%5Ei%5C%7D_%7Bi%3D0%7D%5E%7Bp%2B1%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\{N^i\\}_{i=0}^{p+1}' title='\\{N^i\\}_{i=0}^{p+1}' class='latex' \/> will equal zero if and only if each coefficient equals zero<\/em>. <\/p>\n<p>\nTherefore, setting the coefficients from <a href=\"#spn_homo\">(7)<\/a> equal to zero gives us a system of <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p%2B2&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p+2' title='p+2' class='latex' \/> simultaneous linear equations in the <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p+1' title='p+1' class='latex' \/> unknown coefficients <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_j' title='a_j' class='latex' \/>, one equation for each of the coefficients of <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=N%5Ei&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='N^i' title='N^i' class='latex' \/>:<br \/>\n <a name=\"sys_lin1\"><\/a><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+%28i%3D0%29%5C+%5C+%5C+%5C++%5Csum_%7Bj%3D1%7D%5E%7Bp%2B1%7D+a_j+%3D1%5C+%5C+%5C+%5C+%5C+%288%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle (i=0)\\ \\ \\ \\  \\sum_{j=1}^{p+1} a_j =1\\ \\ \\ \\ \\ (8)' title='\\displaystyle (i=0)\\ \\ \\ \\  \\sum_{j=1}^{p+1} a_j =1\\ \\ \\ \\ \\ (8)' class='latex' \/><br \/>\n <a name=\"sys_lin2\"><\/a><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+%28i%3D1%2C%5Cldots%2Cp%29%5C+%5C+%5C+%5C+%5Csum_%7Bj%3D1%2C+j%5Cneq+i%7D%5E%7Bp%2B1%7D%5Cbinom%7Bj%7D%7Bi%7Da_j+%3D+%5Cbinom%7Bp%7D%7Bi%7D+%5C+%5C+%5C+%5C+%5C+%289%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle (i=1,\\ldots,p)\\ \\ \\ \\ \\sum_{j=1, j\\neq i}^{p+1}\\binom{j}{i}a_j = \\binom{p}{i} \\ \\ \\ \\ \\ (9)' title='\\displaystyle (i=1,\\ldots,p)\\ \\ \\ \\ \\sum_{j=1, j\\neq i}^{p+1}\\binom{j}{i}a_j = \\binom{p}{i} \\ \\ \\ \\ \\ (9)' class='latex' \/><br \/>\n <a name=\"sys_lin3\"><\/a><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+%28i%3Dp%2B1%29%5C+%5C+%5C+%5C++%5Csum_%7Bj%3D1%2C+j%5Cneq+p%2B1%7D%5E%7Bp%2B1%7D%5Cbinom%7Bj%7D%7Bi%7Da_j+%3D+%5Cbinom%7Bp%7D%7Bi%7D%5C+%5C+%5C+%5C+%5C+%28%2A%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle (i=p+1)\\ \\ \\ \\  \\sum_{j=1, j\\neq p+1}^{p+1}\\binom{j}{i}a_j = \\binom{p}{i}\\ \\ \\ \\ \\ (*)' title='\\displaystyle (i=p+1)\\ \\ \\ \\  \\sum_{j=1, j\\neq p+1}^{p+1}\\binom{j}{i}a_j = \\binom{p}{i}\\ \\ \\ \\ \\ (*)' class='latex' \/><br \/>\nObserve that <a href=\"#sys_lin3\">(*)<\/a> reduces to <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=0%3D0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='0=0' title='0=0' class='latex' \/>, since <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=j%3Cp%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='j&lt;p+1' title='j&lt;p+1' class='latex' \/> for all <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='j' title='j' class='latex' \/>, and <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cbinom%7Bn%7D%7Bk%7D%3D0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\binom{n}{k}=0' title='\\binom{n}{k}=0' class='latex' \/> when <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=n%3Ck&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n&lt;k' title='n&lt;k' class='latex' \/>. Thus we are left with a square system of <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p+1' title='p+1' class='latex' \/> equations (<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=i%3D0%2C%5Cldots%2Cp&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='i=0,\\ldots,p' title='i=0,\\ldots,p' class='latex' \/>) in <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p+1' title='p+1' class='latex' \/> unknowns <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_j' title='a_j' class='latex' \/>, (<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=j+%3D+1%2C%5Cldots%2Cp%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='j = 1,\\ldots,p+1' title='j = 1,\\ldots,p+1' class='latex' \/>). <\/p>\n<p>\nBy observing that <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cbinom%7Bj%7D%7Bi%7D%3D1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\binom{j}{i}=1' title='\\binom{j}{i}=1' class='latex' \/> for <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=i%3D0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='i=0' title='i=0' class='latex' \/>, we can combine <a href=\"#sys_lin1\">(8)<\/a> and <a href=\"#sys_lin2\">(9)<\/a> into the single set of linear equations:<br \/>\n<a name=\"linsys01mix\"><\/p>\n<p align=center>\n<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle++%28i%3D0%2C+%5Cldots%2C+p%29%5C+%5C+%5C+%5C+%5Csum_%7Bj%3D1%2C+j%5Cneq+i%7D%5E%7Bp%2B1%7D%5Cbinom%7Bj%7D%7Bi%7Da_j+%3D+%5Cbinom%7Bp%7D%7Bi%7D+%5C+%5C+%5C+%5C+%5C+%2810%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle  (i=0, \\ldots, p)\\ \\ \\ \\ \\sum_{j=1, j\\neq i}^{p+1}\\binom{j}{i}a_j = \\binom{p}{i} \\ \\ \\ \\ \\ (10)' title='\\displaystyle  (i=0, \\ldots, p)\\ \\ \\ \\ \\sum_{j=1, j\\neq i}^{p+1}\\binom{j}{i}a_j = \\binom{p}{i} \\ \\ \\ \\ \\ (10)' class='latex' \/><\/p>\n<p><\/a> Taking into account the inequality <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=j%5Cneq+i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='j\\neq i' title='j\\neq i' class='latex' \/>, and noting once again that <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cbinom%7Bn%7D%7Bk%7D%3D0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\binom{n}{k}=0' title='\\binom{n}{k}=0' class='latex' \/> when <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=n%3Ck&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='n&lt;k' title='n&lt;k' class='latex' \/>, <a href=\"#linsys01mix\">(10)<\/a> simplifies to a triangular linear system:<br \/>\n<a name=\"linsys2\"><\/p>\n<p align=center>\n<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle++%28i%3D0%2C+%5Cldots%2C+p%29%5C+%5C+%5C+%5C+%5Csum_%7Bj%3Di%2B1%7D%5E%7Bp%2B1%7D%5Cbinom%7Bj%7D%7Bi%7Da_j+%3D+%5Cbinom%7Bp%7D%7Bi%7D+%5C+%5C+%5C+%5C+%5C+%2811%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle  (i=0, \\ldots, p)\\ \\ \\ \\ \\sum_{j=i+1}^{p+1}\\binom{j}{i}a_j = \\binom{p}{i} \\ \\ \\ \\ \\ (11)' title='\\displaystyle  (i=0, \\ldots, p)\\ \\ \\ \\ \\sum_{j=i+1}^{p+1}\\binom{j}{i}a_j = \\binom{p}{i} \\ \\ \\ \\ \\ (11)' class='latex' \/><\/p>\n<p><\/a> and hence all <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p+1' title='p+1' class='latex' \/> equations in the system are linearly independent.<\/p>\n<p>\n<h4> From Linear System to Matrix Equation <\/h4>\n<p> The triangular linear system <a href=\"#linsys2\">(11)<\/a> may be readily solved by combining the <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p+1' title='p+1' class='latex' \/> summations into a single matrix equation and using any one of a number of matrix solver packages. But this requires that the system <a href=\"#linsys2\">(11)<\/a> be re-indexed<sup class='footnote'><a href='#fn-1030-4' id='fnref-1030-4' onclick='return fdfootnote_show(1030)'>4<\/a><\/sup> so that the start value of index <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='i' title='i' class='latex' \/> matches that of index <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='j' title='j' class='latex' \/>. Following the usual matrix convention, referred to as 1-indexing, we choose the start indices to be <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=i%3Dj%3D1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='i=j=1' title='i=j=1' class='latex' \/>. <\/p>\n<p>\nThe 1-indexed system is:<br \/>\n<a name=\"linsys1\"><\/p>\n<p align=center>\n<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle++%28i%3D1%2C+%5Cldots%2C+p%2B1%29+%5C+%5C+%5C+%5C+%5Csum_%7Bj%3Di%7D%5E%7Bp%2B1%7D%5Cbinom%7Bj%7D%7Bi-1%7Da_j+%3D+%5Cbinom%7Bp%7D%7Bi-1%7D+%5C+%5C+%5C+%5C+%5C+%2812%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle  (i=1, \\ldots, p+1) \\ \\ \\ \\ \\sum_{j=i}^{p+1}\\binom{j}{i-1}a_j = \\binom{p}{i-1} \\ \\ \\ \\ \\ (12)' title='\\displaystyle  (i=1, \\ldots, p+1) \\ \\ \\ \\ \\sum_{j=i}^{p+1}\\binom{j}{i-1}a_j = \\binom{p}{i-1} \\ \\ \\ \\ \\ (12)' class='latex' \/><\/p>\n<p><\/a> <a href=\"downloads#Code\">Maxima code<\/a> for solving the 0-indexed<sup class='footnote'><a href='#fn-1030-5' id='fnref-1030-5' onclick='return fdfootnote_show(1030)'>5<\/a><\/sup> triangular linear system <a href=\"#linsys0\">(13)<\/a> is given in <a href=\"#AppendixB\">Appendix B<\/a>.  Octave\/Matlab code for solving the 1-indexed triangular linear system <a href=\"#linsys1\">(12)<\/a> is given in <a href=\"#AppendixC\">Appendix C<\/a>.<\/p>\n<p>\n The matrix equation equivalent to <a href=\"#linsys1\">(12)<\/a> is: <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cmathbf%7BM%7D+%5Ccdot+%5Cmathbf%7Ba%7D+%3D+%5Cmathbf%7Bb%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\mathbf{M} \\cdot \\mathbf{a} = \\mathbf{b}' title='\\mathbf{M} \\cdot \\mathbf{a} = \\mathbf{b}' class='latex' \/>, where<br \/>\n <a name=\"matsys\"><\/p>\n<p align=center>\n <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle++%5Cmathbf%7BM%7D+%3A%3D+%5Cbegin%7Bbmatrix%7D+%5Cbinom%7B1%7D%7B0%7D%26%5Cbinom%7B2%7D%7B0%7D%26%5Cldots%26%5Cbinom%7Bp%2B1%7D%7B0%7D%5Crule%5B-.1cm%5D%7B0cm%7D%7B.1cm%7D%5C%5C+%26%5Cbinom%7B2%7D%7B1%7D%26%5Cldots%26%5Cbinom%7Bp%2B1%7D%7B1%7D%5C%5C+%26%5Cldots%26%5Cbinom%7Bj%7D%7Bi-1%7D%5Cldots%5C%5C+%26+%26+%26%5Cbinom%7Bp%2B1%7D%7Bp%7D+%5Cend%7Bbmatrix%7D%2C%5C+%5C+%5C+%5Cmathbf%7Ba%7D+%3A%3D+%5Cbegin%7Bbmatrix%7Da_1%5C%5Ca_2%5C%5C+%5Cldots%5C%5C+a_%7Bp%2B1%7D%5Cend%7Bbmatrix%7D%2C%5C+%5C+%5Cmbox%7Band%7D+%5C+%5C+%5Cmathbf%7Bb%7D+%3A%3D+%5Cbegin%7Bbmatrix%7D%5Cbinom%7Bp%7D%7B0%7D%5C%5C%5Cbinom%7Bp%7D%7B1%7D%5C%5C%5Cldots%5C%5C%5Cbinom%7Bp%7D%7Bp%7D%5Cend%7Bbmatrix%7D.+%5C+%5C+%5C+%5C+%5C+%2814%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle  \\mathbf{M} := \\begin{bmatrix} \\binom{1}{0}&amp;\\binom{2}{0}&amp;\\ldots&amp;\\binom{p+1}{0}\\rule[-.1cm]{0cm}{.1cm}\\\\ &amp;\\binom{2}{1}&amp;\\ldots&amp;\\binom{p+1}{1}\\\\ &amp;\\ldots&amp;\\binom{j}{i-1}\\ldots\\\\ &amp; &amp; &amp;\\binom{p+1}{p} \\end{bmatrix},\\ \\ \\ \\mathbf{a} := \\begin{bmatrix}a_1\\\\a_2\\\\ \\ldots\\\\ a_{p+1}\\end{bmatrix},\\ \\ \\mbox{and} \\ \\ \\mathbf{b} := \\begin{bmatrix}\\binom{p}{0}\\\\\\binom{p}{1}\\\\\\ldots\\\\\\binom{p}{p}\\end{bmatrix}. \\ \\ \\ \\ \\ (14)' title='\\displaystyle  \\mathbf{M} := \\begin{bmatrix} \\binom{1}{0}&amp;\\binom{2}{0}&amp;\\ldots&amp;\\binom{p+1}{0}\\rule[-.1cm]{0cm}{.1cm}\\\\ &amp;\\binom{2}{1}&amp;\\ldots&amp;\\binom{p+1}{1}\\\\ &amp;\\ldots&amp;\\binom{j}{i-1}\\ldots\\\\ &amp; &amp; &amp;\\binom{p+1}{p} \\end{bmatrix},\\ \\ \\ \\mathbf{a} := \\begin{bmatrix}a_1\\\\a_2\\\\ \\ldots\\\\ a_{p+1}\\end{bmatrix},\\ \\ \\mbox{and} \\ \\ \\mathbf{b} := \\begin{bmatrix}\\binom{p}{0}\\\\\\binom{p}{1}\\\\\\ldots\\\\\\binom{p}{p}\\end{bmatrix}. \\ \\ \\ \\ \\ (14)' class='latex' \/><\/p>\n<p><\/a> Since <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cmathbf%7BM%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\mathbf{M}' title='\\mathbf{M}' class='latex' \/> is an upper triangular matrix with all non-zero upper triangular entries, we know we can readily solve this for any given values of <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/> and <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=N&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='N' title='N' class='latex' \/> using a matrix solver system such as <a href=\"maxima\">Maxima<\/a>\/Mathematica, Octave\/Matlab, or Maple, among others. <a href=\"downloads#Code\">Source code<\/a> for solutions in <a href=\"maxima\">Maxima<\/a> and Octave\/Matlab are given in <a href=\"#AppendixB\">Appendix B<\/a> and <a href=\"#AppendixC\">Appendix C<\/a>, respectively.<\/p>\n<p><h4> Computing the General, Closed-Form Solution <\/h4>\n<p> We know from <a href=\"#spnsol\">(2)<\/a> that the general, closed-form solution to <a href=\"#spn\">(1)<\/a> is a <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p+1' title='p+1' class='latex' \/>-degree polynomial <a href=\"#spn_poly\">(3)<\/a> in <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=N&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='N' title='N' class='latex' \/> with rational coefficients <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_j' title='a_j' class='latex' \/> given by solving the triangular linear system <a href=\"#linsys1\">(12)<\/a>, or equivalently <a href=\"#matsys\">(14)<\/a>.<\/p>\n<p>\nThe highest few coefficients <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_j' title='a_j' class='latex' \/> can be readily computed by hand. For all <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/>, we have: <\/p>\n<ol>\n<li> <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_%7Bp%2B1%7D+%3D+%5Cfrac%7B1%7D%7Bp%2B1%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_{p+1} = \\frac{1}{p+1}' title='a_{p+1} = \\frac{1}{p+1}' class='latex' \/>\n<li> <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_p+%3D+%5Cfrac%7B1%7D%7B2%7D%5Cbinom%7Bp%7D%7B0%7D+%3D+%5Cfrac%7B1%7D%7B2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_p = \\frac{1}{2}\\binom{p}{0} = \\frac{1}{2}' title='a_p = \\frac{1}{2}\\binom{p}{0} = \\frac{1}{2}' class='latex' \/>\n<li> <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_%7Bp-1%7D+%3D+%5Cfrac%7B1%7D%7B12%7D%5Cbinom%7Bp%7D%7B1%7D+%3D+%5Cfrac%7Bp%7D%7B12%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_{p-1} = \\frac{1}{12}\\binom{p}{1} = \\frac{p}{12}' title='a_{p-1} = \\frac{1}{12}\\binom{p}{1} = \\frac{p}{12}' class='latex' \/>\n<li> <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_%7Bp-3%7D+%3D+-%5Cfrac%7B1%7D%7B120%7D%5Cbinom%7Bp%7D%7B3%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_{p-3} = -\\frac{1}{120}\\binom{p}{3}' title='a_{p-3} = -\\frac{1}{120}\\binom{p}{3}' class='latex' \/>\n<li> <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_%7Bp-5%7D+%3D+%5Cfrac%7B1%7D%7B252%7D%5Cbinom%7Bp%7D%7B5%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_{p-5} = \\frac{1}{252}\\binom{p}{5}' title='a_{p-5} = \\frac{1}{252}\\binom{p}{5}' class='latex' \/>\n<li> <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_%7Bp-7%7D+%3D+-%5Cfrac%7B1%7D%7B240%7D%5Cbinom%7Bp%7D%7B7%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_{p-7} = -\\frac{1}{240}\\binom{p}{7}' title='a_{p-7} = -\\frac{1}{240}\\binom{p}{7}' class='latex' \/>\n<li> <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_%7Bp-9%7D+%3D+%5Cfrac%7B1%7D%7B132%7D%5Cbinom%7Bp%7D%7B9%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_{p-9} = \\frac{1}{132}\\binom{p}{9}' title='a_{p-9} = \\frac{1}{132}\\binom{p}{9}' class='latex' \/>.\n<li> In particular, we claim (without proof) that<br \/>\n<a name=\"ci\"><\/p>\n<p align=center>\n<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle++a_%7Bp-i%7D%3Dc_%7Bi%7D%5Cbinom%7Bp%7D%7Bi%7D%2C+%5C+%5C+%5C+%5C+%5C+%2815%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle  a_{p-i}=c_{i}\\binom{p}{i}, \\ \\ \\ \\ \\ (15)' title='\\displaystyle  a_{p-i}=c_{i}\\binom{p}{i}, \\ \\ \\ \\ \\ (15)' class='latex' \/><\/p>\n<p><\/a> where the <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%7Bc_%7Bi%7D%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='{c_{i}}' title='{c_{i}}' class='latex' \/> are rational coefficients independent of <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/>, and <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=c_%7Bi%7D%3D0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='c_{i}=0' title='c_{i}=0' class='latex' \/> for all even positive <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='i' title='i' class='latex' \/>. Hence we have: <\/p>\n<p align=center>\n<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+a_%7Bp-2%7D+%3D+a_%7Bp-4%7D+%3D+%5Cldots+%3D+0.&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle a_{p-2} = a_{p-4} = \\ldots = 0.' title='\\displaystyle a_{p-2} = a_{p-4} = \\ldots = 0.' class='latex' \/><\/p>\n<\/ol>\n<p> Substituting the above coefficients into the general closed-form polynomial solution gives us:<br \/>\n <a name=\"spnsol_closed\"><\/a> <\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_p%28N%29+%3D+%5Cfrac%7B1%7D%7Bp%2B1%7D+N%5E%7Bp%2B1%7D+%2B+%5Cfrac%7B1%7D%7B2%7D+N%5Ep+%2B+%5Cfrac%7Bp%7D%7B12%7DN%5E%7Bp-1%7D+-%5Cfrac%7B1%7D%7B120%7D%5Cbinom%7Bp%7D%7B3%7DN%5E%7Bp-3%7D+%2B+%5Cfrac%7B1%7D%7B252%7D%5Cbinom%7Bp%7D%7B5%7DN%5E%7Bp-5%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_p(N) = \\frac{1}{p+1} N^{p+1} + \\frac{1}{2} N^p + \\frac{p}{12}N^{p-1} -\\frac{1}{120}\\binom{p}{3}N^{p-3} + \\frac{1}{252}\\binom{p}{5}N^{p-5}' title='\\displaystyle S_p(N) = \\frac{1}{p+1} N^{p+1} + \\frac{1}{2} N^p + \\frac{p}{12}N^{p-1} -\\frac{1}{120}\\binom{p}{3}N^{p-3} + \\frac{1}{252}\\binom{p}{5}N^{p-5}' class='latex' \/><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+%5C+%5C+%5C+%5C+%5C+%5C+%5C+%5C+%5C+%5C++-+%5Cfrac%7B1%7D%7B240%7D%5Cbinom%7Bp%7D%7B7%7DN%5E%7Bp-7%7D+%2B+%5Cfrac%7B1%7D%7B132%7D%5Cbinom%7Bp%7D%7B9%7DN%5E%7Bp-9%7D+-+%5Cldots+%2B+p+c_%7Bp-1%7D+N.+%5C+%5C+%5C+%5C+%5C+%2816%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle \\ \\ \\ \\ \\ \\ \\ \\ \\ \\  - \\frac{1}{240}\\binom{p}{7}N^{p-7} + \\frac{1}{132}\\binom{p}{9}N^{p-9} - \\ldots + p c_{p-1} N. \\ \\ \\ \\ \\ (16)' title='\\displaystyle \\ \\ \\ \\ \\ \\ \\ \\ \\ \\  - \\frac{1}{240}\\binom{p}{7}N^{p-7} + \\frac{1}{132}\\binom{p}{9}N^{p-9} - \\ldots + p c_{p-1} N. \\ \\ \\ \\ \\ (16)' class='latex' \/><\/p>\n<p>\nA listing of the solution formulas for the first ten <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/> values is given in <a href=\"#AppendixA\">Appendix A<\/a>.<\/p>\n<p>\n<h4> Conclusion <\/h4>\n<p> Reviewing the path we have taken in this 3-part paper: <a href=\"finite-summations-1\">Part 1<\/a> <a href=\"#Ebrahim\/Sumkp1\" name=\"CITEEbrahim\/Sumkp1\"><\/a> motivated the problem and illustrated a recurrence relation method for obtaining the solution for small <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/>. <a href=\"finite-summations-2\">Part 2<\/a> <a href=\"#Ebrahim\/Sumkp2\" name=\"CITEEbrahim\/Sumkp2\"><\/a> generalized this method and found a <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/>-th order recurrence relation for the solution. Part 2 also illustrated, by an induction argument, that the closed form solutions for all <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/> are polynomials of degree <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p%2B1&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p+1' title='p+1' class='latex' \/> with rational coefficients and no constant term. <\/p>\n<p>\nThis paper used the closed-form polynomial expression motivated in Part 2 to obtain a direct solution. By writing out the polynomial form with undetermined coefficients, the recurrence relation <a href=\"#spn_rec\">(4)<\/a> was manipulated into a linear combination of polynomials <a href=\"#spn_homo\">(7)<\/a>. Using a linear independence argument, <a href=\"#spn_homo\">(7)<\/a> was reduced to a triangular linear system <a href=\"#linsys1\">(12)<\/a> and associated matrix equation <a href=\"#matsys\">(14)<\/a>.The general closed-form solution is <a href=\"#spnsol_closed\">(16)<\/a>.<\/p>\n<p>\n Solving the finite-summation-of-integer-powers problem <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Csum_%7Bk%3D1%7D%5EN+k%5Ep&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\sum_{k=1}^N k^p' title='\\sum_{k=1}^N k^p' class='latex' \/>, for arbitrary positive integers <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/> and <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=N&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='N' title='N' class='latex' \/> has provided a natural setting to use a variety of techniques from discrete mathematics and linear algebra, and poses additional interesting questions (characterization of the denominators in the coefficients of <a href=\"#spnsol_closed\">(16)<\/a> (the <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=c_i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='c_i' title='c_i' class='latex' \/> in <a href=\"#ci\">(15)<\/a>) and divisibility properties of <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_p' title='S_p' class='latex' \/> for various <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/>). In particular, we have obtained a direct method for solving the finite-summation-of-integer-powers problem that invokes a matrix solution and does not require iteration.<\/p>\n<p>\n<hr>\n<p><a name=\"AppendixA\"><\/a><\/p>\n<h4> Appendix A: Listing of Solutions to <a href=\"#spn\">(1)<\/a><\/h4>\n<p>A listing of the solution formulas for the first ten <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/> values is as follows: <\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_1%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5E%7BN%7Dk+%3D%5Cfrac%7B%7BN%7D%5E%7B2%7D%7D%7B2%7D%2B%5Cfrac%7BN%7D%7B2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_1(N) = \\sum_{k=1}^{N}k =\\frac{{N}^{2}}{2}+\\frac{N}{2}' title='\\displaystyle S_1(N) = \\sum_{k=1}^{N}k =\\frac{{N}^{2}}{2}+\\frac{N}{2}' class='latex' \/><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_2%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5E%7BN%7D%7Bk%7D%5E%7B2%7D%3D%5Cfrac%7B%7BN%7D%5E%7B3%7D%7D%7B3%7D%2B%5Cfrac%7B%7BN%7D%5E%7B2%7D%7D%7B2%7D%2B%5Cfrac%7BN%7D%7B6%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_2(N) = \\sum_{k=1}^{N}{k}^{2}=\\frac{{N}^{3}}{3}+\\frac{{N}^{2}}{2}+\\frac{N}{6}' title='\\displaystyle S_2(N) = \\sum_{k=1}^{N}{k}^{2}=\\frac{{N}^{3}}{3}+\\frac{{N}^{2}}{2}+\\frac{N}{6}' class='latex' \/><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_3%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5E%7BN%7D%7Bk%7D%5E%7B3%7D%3D%5Cfrac%7B%7BN%7D%5E%7B4%7D%7D%7B4%7D%2B%5Cfrac%7B%7BN%7D%5E%7B3%7D%7D%7B2%7D%2B%5Cfrac%7B%7BN%7D%5E%7B2%7D%7D%7B4%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_3(N) = \\sum_{k=1}^{N}{k}^{3}=\\frac{{N}^{4}}{4}+\\frac{{N}^{3}}{2}+\\frac{{N}^{2}}{4}' title='\\displaystyle S_3(N) = \\sum_{k=1}^{N}{k}^{3}=\\frac{{N}^{4}}{4}+\\frac{{N}^{3}}{2}+\\frac{{N}^{2}}{4}' class='latex' \/><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_4%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5E%7BN%7D%7Bk%7D%5E%7B4%7D%3D%5Cfrac%7B%7BN%7D%5E%7B5%7D%7D%7B5%7D%2B%5Cfrac%7B%7BN%7D%5E%7B4%7D%7D%7B2%7D%2B%5Cfrac%7B%7BN%7D%5E%7B3%7D%7D%7B3%7D-%5Cfrac%7BN%7D%7B30%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_4(N) = \\sum_{k=1}^{N}{k}^{4}=\\frac{{N}^{5}}{5}+\\frac{{N}^{4}}{2}+\\frac{{N}^{3}}{3}-\\frac{N}{30}' title='\\displaystyle S_4(N) = \\sum_{k=1}^{N}{k}^{4}=\\frac{{N}^{5}}{5}+\\frac{{N}^{4}}{2}+\\frac{{N}^{3}}{3}-\\frac{N}{30}' class='latex' \/><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_5%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5E%7BN%7D%7Bk%7D%5E%7B5%7D%3D%5Cfrac%7B%7BN%7D%5E%7B6%7D%7D%7B6%7D%2B%5Cfrac%7B%7BN%7D%5E%7B5%7D%7D%7B2%7D%2B%5Cfrac%7B5%5C%2C%7BN%7D%5E%7B4%7D%7D%7B12%7D-%5Cfrac%7B%7BN%7D%5E%7B2%7D%7D%7B12%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_5(N) = \\sum_{k=1}^{N}{k}^{5}=\\frac{{N}^{6}}{6}+\\frac{{N}^{5}}{2}+\\frac{5\\,{N}^{4}}{12}-\\frac{{N}^{2}}{12}' title='\\displaystyle S_5(N) = \\sum_{k=1}^{N}{k}^{5}=\\frac{{N}^{6}}{6}+\\frac{{N}^{5}}{2}+\\frac{5\\,{N}^{4}}{12}-\\frac{{N}^{2}}{12}' class='latex' \/><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_6%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5E%7BN%7D%7Bk%7D%5E%7B6%7D%3D%5Cfrac%7B%7BN%7D%5E%7B7%7D%7D%7B7%7D%2B%5Cfrac%7B%7BN%7D%5E%7B6%7D%7D%7B2%7D%2B%5Cfrac%7B%7BN%7D%5E%7B5%7D%7D%7B2%7D-%5Cfrac%7B%7BN%7D%5E%7B3%7D%7D%7B6%7D%2B%5Cfrac%7BN%7D%7B42%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_6(N) = \\sum_{k=1}^{N}{k}^{6}=\\frac{{N}^{7}}{7}+\\frac{{N}^{6}}{2}+\\frac{{N}^{5}}{2}-\\frac{{N}^{3}}{6}+\\frac{N}{42}' title='\\displaystyle S_6(N) = \\sum_{k=1}^{N}{k}^{6}=\\frac{{N}^{7}}{7}+\\frac{{N}^{6}}{2}+\\frac{{N}^{5}}{2}-\\frac{{N}^{3}}{6}+\\frac{N}{42}' class='latex' \/><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_7%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5E%7BN%7D%7Bk%7D%5E%7B7%7D%3D%5Cfrac%7B%7BN%7D%5E%7B8%7D%7D%7B8%7D%2B%5Cfrac%7B%7BN%7D%5E%7B7%7D%7D%7B2%7D%2B%5Cfrac%7B7%5C%2C%7BN%7D%5E%7B6%7D%7D%7B12%7D-%5Cfrac%7B7%5C%2C%7BN%7D%5E%7B4%7D%7D%7B24%7D%2B%5Cfrac%7B%7BN%7D%5E%7B2%7D%7D%7B12%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_7(N) = \\sum_{k=1}^{N}{k}^{7}=\\frac{{N}^{8}}{8}+\\frac{{N}^{7}}{2}+\\frac{7\\,{N}^{6}}{12}-\\frac{7\\,{N}^{4}}{24}+\\frac{{N}^{2}}{12}' title='\\displaystyle S_7(N) = \\sum_{k=1}^{N}{k}^{7}=\\frac{{N}^{8}}{8}+\\frac{{N}^{7}}{2}+\\frac{7\\,{N}^{6}}{12}-\\frac{7\\,{N}^{4}}{24}+\\frac{{N}^{2}}{12}' class='latex' \/><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_8%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5E%7BN%7D%7Bk%7D%5E%7B8%7D%3D%5Cfrac%7B%7BN%7D%5E%7B9%7D%7D%7B9%7D%2B%5Cfrac%7B%7BN%7D%5E%7B8%7D%7D%7B2%7D%2B%5Cfrac%7B2%5C%2C%7BN%7D%5E%7B7%7D%7D%7B3%7D-%5Cfrac%7B7%5C%2C%7BN%7D%5E%7B5%7D%7D%7B15%7D%2B%5Cfrac%7B2%5C%2C%7BN%7D%5E%7B3%7D%7D%7B9%7D-%5Cfrac%7BN%7D%7B30%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_8(N) = \\sum_{k=1}^{N}{k}^{8}=\\frac{{N}^{9}}{9}+\\frac{{N}^{8}}{2}+\\frac{2\\,{N}^{7}}{3}-\\frac{7\\,{N}^{5}}{15}+\\frac{2\\,{N}^{3}}{9}-\\frac{N}{30}' title='\\displaystyle S_8(N) = \\sum_{k=1}^{N}{k}^{8}=\\frac{{N}^{9}}{9}+\\frac{{N}^{8}}{2}+\\frac{2\\,{N}^{7}}{3}-\\frac{7\\,{N}^{5}}{15}+\\frac{2\\,{N}^{3}}{9}-\\frac{N}{30}' class='latex' \/><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_9%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5E%7BN%7D%7Bk%7D%5E%7B9%7D%3D%5Cfrac%7B%7BN%7D%5E%7B10%7D%7D%7B10%7D%2B%5Cfrac%7B%7BN%7D%5E%7B9%7D%7D%7B2%7D%2B%5Cfrac%7B3%5C%2C%7BN%7D%5E%7B8%7D%7D%7B4%7D-%5Cfrac%7B7%5C%2C%7BN%7D%5E%7B6%7D%7D%7B10%7D%2B%5Cfrac%7B%7BN%7D%5E%7B4%7D%7D%7B2%7D-%5Cfrac%7B3%5C%2C%7BN%7D%5E%7B2%7D%7D%7B20%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_9(N) = \\sum_{k=1}^{N}{k}^{9}=\\frac{{N}^{10}}{10}+\\frac{{N}^{9}}{2}+\\frac{3\\,{N}^{8}}{4}-\\frac{7\\,{N}^{6}}{10}+\\frac{{N}^{4}}{2}-\\frac{3\\,{N}^{2}}{20}' title='\\displaystyle S_9(N) = \\sum_{k=1}^{N}{k}^{9}=\\frac{{N}^{10}}{10}+\\frac{{N}^{9}}{2}+\\frac{3\\,{N}^{8}}{4}-\\frac{7\\,{N}^{6}}{10}+\\frac{{N}^{4}}{2}-\\frac{3\\,{N}^{2}}{20}' class='latex' \/><\/p>\n<p align=center><img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+S_%7B10%7D%28N%29+%3D+%5Csum_%7Bk%3D1%7D%5E%7BN%7D%7Bk%7D%5E%7B10%7D%3D%5Cfrac%7B%7BN%7D%5E%7B11%7D%7D%7B11%7D%2B%5Cfrac%7B%7BN%7D%5E%7B10%7D%7D%7B2%7D%2B%5Cfrac%7B5%5C%2C%7BN%7D%5E%7B9%7D%7D%7B6%7D-%7BN%7D%5E%7B7%7D%2B%7BN%7D%5E%7B5%7D-%5Cfrac%7B%7BN%7D%5E%7B3%7D%7D%7B2%7D%2B%5Cfrac%7B5%5C%2CN%7D%7B66%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle S_{10}(N) = \\sum_{k=1}^{N}{k}^{10}=\\frac{{N}^{11}}{11}+\\frac{{N}^{10}}{2}+\\frac{5\\,{N}^{9}}{6}-{N}^{7}+{N}^{5}-\\frac{{N}^{3}}{2}+\\frac{5\\,N}{66}' title='\\displaystyle S_{10}(N) = \\sum_{k=1}^{N}{k}^{10}=\\frac{{N}^{11}}{11}+\\frac{{N}^{10}}{2}+\\frac{5\\,{N}^{9}}{6}-{N}^{7}+{N}^{5}-\\frac{{N}^{3}}{2}+\\frac{5\\,N}{66}' class='latex' \/><\/p>\n<p>\n<p><a name=\"AppendixB\"><\/a><\/p>\n<h4> Appendix B: Maxima Source Code for Solving <a href=\"#matsys\">(14)<\/a><\/h4>\n<p>\nFor particular <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/>, the coefficients <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_j' title='a_j' class='latex' \/> for the closed form solutions <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_p%28N%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_p(N)' title='S_p(N)' class='latex' \/> are immediate. Maxima code, is given below, for determining this solution using the 0-indexed triangular linear system <a href=\"#linsys0\">(13)<\/a>:<\/p>\n<blockquote><p><code><\/p>\n<pre>\r\n     solution(p):= block([a, eq],\t\/* give subroutine variables local scope *\/\r\n     v : makelist(a[i], i, 0, p),\t\/* create list of unknowns (0-indexed) *\/\r\n\t\t\t\t\t\/* create list of equations (0-indexed) *\/\r\n     eq : makelist(sum(binom(j+1,i)*a[j],j,i,p) = binom(p,i), i, 0, p),\r\n     linsolve(eq, v)\r\n  )$\r\n<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>\nA more elaborate function that computes the series form and factored forms of the solution is given below. This was used to generate the first ten solution listings.<\/p>\n<blockquote><p><code><\/p>\n<pre>\r\n\tSpN_mat(p):= block([a, eq],\t\/* give subroutine variables local scope *\/\r\n\tv : makelist(a[i], i, 0, p),\t\/* create list of unknowns (0-indexed)   *\/\r\n\t\t\t\t\t\/* create list of equations (0-indexed)  *\/\r\n\teq : makelist(sum(binom(j+1,i)*a[j],j,i,p) = binom(p,i), i, 0, p),  \r\n     \r\n\t\/* find coefficients of solution polynomial by solving linear system *\/\r\n\tsol : linsolve(eq, v),\r\n     \r\n\t\/* create polynomial: inner product of {N^i} with coefficients *\/\r\n\tpol : makelist(N^(i+1),i,0,p),\t\/* monomials {N^i} *\/\r\n     \r\n\t\/* closed form formula *\/\r\n\tcff : rhs(sol.pol), \t\/* inner product of {N^i} with coefficients *\/     \r\n\tcff \t\t\t\t\/* return closed form formula in series *\/\r\n  )$\r\n<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p><a href=\"..\/code\/sumkp_matrix.mac\">Download the complete Maxima source code listing here.<\/a><\/p>\n<p><a name=\"AppendixC\"><\/a><\/p>\n<h4> Appendix C: Octave\/Matlab Source Code for Solving <a href=\"#matsys\">(14)<\/a><\/h4>\n<p>For particular <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=p&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='p' title='p' class='latex' \/>, the coefficients <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=a_j&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='a_j' title='a_j' class='latex' \/> for the closed form solutions <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=S_p%28N%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='S_p(N)' title='S_p(N)' class='latex' \/> are immediate. Octave\/Matlab code, is given below, for determining this solution using the 1-indexed triangular linear system <a href=\"#linsys1\">(12)<\/a>:<\/p>\n<blockquote><p><code><\/p>\n<pre>\r\n% Functions listing coefficients from a_p+1 to a_1 as fractions\r\n\r\nfunction c = sumkp_matrix(p)\r\n    M=zeros(p+1); \t\t% initialize matrix M\r\n    for i=1:p+1\r\n        for j=i:p+1\t\t% set upper triangular elements\r\n            M(i,j)=nchoosek(j,i-1);  %  Equation (12)\r\n        end;\r\n    end;\r\n    \r\n    b=zeros(p+1,1); % initialize column matrix b\r\n    for i=1:p+1\r\n        b(i)=nchoosek(p,i-1);  %  Equation (12)\r\n    end\r\n    \r\n    c=inv(M)*b;  % Solve to obtain coefficients\r\n       \r\n    c=fliplr(c');\t\t% List from highest index to lowest\r\n    sml=abs(c)<1e-8;\t% Numerical correction: set tiny coeffients to exactly zero\r\n    c(find(sml==1))=0;\r\n    \r\n    disp(\"Solution Coefficients (High to Low order):\")\r\n    c=rats(c);  \t\t% return coefficients as fractions\r\n\r\nend;\r\n<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p><a href=\"..\/code\/sumkp_matrix.m\">Download the complete Octave source code listing here.<\/a><\/p>\n<hr>\n<p>\nThis article is available for download as a PDF <a href=\"downloads#Papers\">here<\/a>.<\/p>\n<p>The Maxima and Octave complete source code listings implementing the direct matrix solution are available for download <a href=\"downloads#Code\">here<\/a>.<\/p>\n<hr>\n<p><h4>References<\/h4>\n<dl compact=\"compact\">\n<dt><a href=\"#CITEEbrahim\/Sumkp1\" name=\"Ebrahim\/Sumkp1\">[Ebr10a]<\/a><\/dt>\n<dd>\nAssad Ebrahim.<br \/>\n <a href=\"finite-summations-1\">Finite summation of integer powers x<sup>p<\/sup>, part 1.<\/a><br \/>\n January 2010.<\/p>\n<p><dt><a href=\"#CITEEbrahim\/Sumkp2\" name=\"Ebrahim\/Sumkp2\">[EO10b]<\/a><\/dt>\n<dd>\nAssad Ebrahim.<br \/>\n <a href=\"finite-summations-2\">Finite summation of integer powers x<sup>p<\/sup>, part 2.<\/a><br \/>\n February 2010.<\/p>\n<p><dt><a href=\"#CITEGKP\/Concrete\" name=\"GKP\/Concrete\">[GKP]<\/a><\/dt>\n<dd>\nRon Graham, Donald Knuth, and Oren Patashnik.<br \/>\n <em>Concrete Mathematics: A Foundation for Computer Science<\/em>.<br \/>\n Addison Wesley.<\/p>\n<p><dt><a href=\"#CITEKnuth\/TAOCP\" name=\"Knuth\/TAOCP\">[Knu]<\/a><\/dt>\n<dd>\nDonald Knuth.<br \/>\n <em>The Art of Computer Programming (3 Volumes)<\/em>.<\/dl>\n<hr \/>\n<p><h4>Footnotes<\/h4>\n<div class='footnotes' id='footnotes-1030'>\n<div class='footnotedivider'><\/div>\n<ol>\n<li id='fn-1030-1'> The notation <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cbinom%7Bn%7D%7Bk%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\binom{n}{k}' title='\\binom{n}{k}' class='latex' \/> used above denotes binomial coefficients, often expressed verbally as \"n choose k\". Other representations of these coefficients include <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=C%28n%2Ck%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='C(n,k)' title='C(n,k)' class='latex' \/> and <img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=C_%7Bk%7D%5E%7Bn%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='C_{k}^{n}' title='C_{k}^{n}' class='latex' \/>. <span class='footnotereverse'><a href='#fnref-1030-1'>&#8617;<\/a><\/span><\/li>\n<li id='fn-1030-2'> <a href=\"downloads#Code\">Maxima code<\/a> for automatically computing solutions to <a href=\"#spn\">(1)<\/a> using solution formula <a href=\"#spnsol\">(2)<\/a> is given in <a href=\"finite-summations-2\">Part 2 of this paper<\/a> <a href=\"#Ebrahim\/Sumkp2\" name=\"CITEEbrahim\/Sumkp2\"><\/a>. <span class='footnotereverse'><a href='#fnref-1030-2'>&#8617;<\/a><\/span><\/li>\n<li id='fn-1030-3'> Such manipulations are taught in material such as <a href=\"#GKP\/Concrete\" name=\"CITEGKP\/Concrete\">(GKP)<\/a> and <a href=\"#Knuth\/TAOCP\" name=\"CITEKnuth\/TAOCP\">(Knu)<\/a>. <span class='footnotereverse'><a href='#fnref-1030-3'>&#8617;<\/a><\/span><\/li>\n<li id='fn-1030-4'> Index manipulation is covered in <a href=\"#GKP\/Concrete\" name=\"CITEGKP\/Concrete\">(GKP)<\/a> and <a href=\"#Knuth\/TAOCP\" name=\"CITEKnuth\/TAOCP\">(Knu)<\/a>. <span class='footnotereverse'><a href='#fnref-1030-4'>&#8617;<\/a><\/span><\/li>\n<li id='fn-1030-5'> 0-indexing is more convenient for various computational software packages and programming langauges, including <a href=\"maxima\">Maxima<\/a>. The 0-indexed system is:<br \/>\n<a name=\"linsys0\"><\/p>\n<p align=center>\n<img loading=\"lazy\" src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle++%28i%3D0%2C%5Cldots%2Cp%29%5C+%5C+%5C+%5C+%5Csum_%7Bj%3Di%7D%5E%7Bp%7D%5Cbinom%7Bj%2B1%7D%7Bi%7Da_j+%3D%5Cbinom%7Bp%7D%7Bi%7D+%5C+%5C+%5C+%5C+%5C+%2813%29&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle  (i=0,\\ldots,p)\\ \\ \\ \\ \\sum_{j=i}^{p}\\binom{j+1}{i}a_j =\\binom{p}{i} \\ \\ \\ \\ \\ (13)' title='\\displaystyle  (i=0,\\ldots,p)\\ \\ \\ \\ \\sum_{j=i}^{p}\\binom{j+1}{i}a_j =\\binom{p}{i} \\ \\ \\ \\ \\ (13)' class='latex' \/><\/p>\n<p><\/a>  <span class='footnotereverse'><a href='#fnref-1030-5'>&#8617;<\/a><\/span><\/li>\n<\/ol>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>(Discrete Mathematics Techniques III)<\/p>\n<p>1st ed. Apr 2nd, 2010<\/p>\n<p>Abstract This is the last in the 3-part series of articles on finding for oneself the solution to the sum of integer power problem, and in the process discovering the Bernoulli numbers. In Part 3 (this paper), we find a direct closed-form solution, i.e. one that [Read More&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"categories":[31,119],"tags":[25,26,126,47,23,32,29,48,123],"coauthors":[112,46],"class_list":["post-1030","post","type-post","status-publish","format-standard","hentry","category-mathematics","category-technical","tag-discrete-mathematics","tag-finite-summation","tag-mathematics","tag-matlab","tag-maxima","tag-octave","tag-problem-solving","tag-source-code","tag-software-tools","odd"],"views":14927,"_links":{"self":[{"href":"https:\/\/mathscitech.org\/articles\/wp-json\/wp\/v2\/posts\/1030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mathscitech.org\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mathscitech.org\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mathscitech.org\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mathscitech.org\/articles\/wp-json\/wp\/v2\/comments?post=1030"}],"version-history":[{"count":34,"href":"https:\/\/mathscitech.org\/articles\/wp-json\/wp\/v2\/posts\/1030\/revisions"}],"predecessor-version":[{"id":9860,"href":"https:\/\/mathscitech.org\/articles\/wp-json\/wp\/v2\/posts\/1030\/revisions\/9860"}],"wp:attachment":[{"href":"https:\/\/mathscitech.org\/articles\/wp-json\/wp\/v2\/media?parent=1030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mathscitech.org\/articles\/wp-json\/wp\/v2\/categories?post=1030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mathscitech.org\/articles\/wp-json\/wp\/v2\/tags?post=1030"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/mathscitech.org\/articles\/wp-json\/wp\/v2\/coauthors?post=1030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}