Faulhaber's formula: Difference between revisions

Line 830:
 
{{FormulaeEntry|page=https://formulae.org/?script=examples/Faulhaber}}
 
'''Solution'''
 
The following function creates the Faulhaber's coefficients up to a given number of rows, according to the [http://www.ww.ingeniousmathstat.org/sites/default/files/Torabi-Dashti-CMJ-2011.pdf paper] of of Mohammad Torabi Dashti:
 
[[File:Fōrmulæ - Faulhaber 01.png]]
 
The following function creates the sum of the p-th powers of the first n positive integers as a (p + 1)th-degree polynomial function of n:
 
Notes. The -1 index means the last element (-2 is the penultimate element, and so on). So it retrieves the last row of the triangle. |x| is the cardinality (number of elements) of x.
 
[[File:Fōrmulæ - Faulhaber 06.png]]
 
To generate the first 10 closed-form expressions, starting with p = 0:
 
[[File:Fōrmulæ - Faulhaber 07.png]]
 
[[File:Fōrmulæ - Faulhaber 08.png]]
 
=={{header|GAP}}==
2,120

edits