Faulhaber

From Fōrmulæ wiki
Revision as of 12:07, 9 October 2019 by Admin (Talk | contribs) (Creation of page)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page is a solution to the tasks Faulhaber's triangle and Faulhaber's formula in the Rosetta Code, written in Fōrmulæ.

Description (from Rosetta Code)

Faulhaber's triangle

Named after Johann Faulhaber, the rows of Faulhaber's triangle are the coefficients of polynomials that represent sums of integer powers, which are extracted from Faulhaber's formula:

where is the nth-Bernoulli number.

The first 5 rows of Faulhaber's triangle, are:

    1
  1/2  1/2
  1/6  1/2  1/3
    0  1/4  1/2  1/4
-1/30    0  1/3  1/2  1/5

Using the third row of the triangle, we have:

Task
  • show the first 10 rows of Faulhaber's triangle.
  • using the 18th row of Faulhaber's triangle, compute the sum: (extra credit).
See also

Faulhaber's formula

In mathematics, Faulhaber's formula, named after Johann Faulhaber, expresses the sum of the p-th powers of the first n positive integers as a (p + 1)th-degree polynomial function of n, the coefficients involving Bernoulli numbers.
Task

Generate the first 10 closed-form expressions, starting with p = 0.

Related tasks
See also

Solution

The following function creates the Faulhaber's coefficients up to a given number of rows, according to the paper of Mohammad Torabi Dashti:

Faulhaber01.png

To show the first 10 rows of Faulhaber's triangle:

Faulhaber02.png

In order to show the previous result as a triangle:

Faulhaber03.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:

Faulhaber04.png

To generate the first 10 closed-form expressions, starting with p = 0:

Faulhaber05.png

Extra credit. Using the 18th row of Faulhaber's triangle, compute the sum: :

Faulhaber06.png