# Square pyramidal number

The square pyramidal numbers belong to the figured numbers , more precisely to the pyramidal numbers . They quantify the number of spheres that can be used to build a pyramid with a square base. As the chart below it shows the example of the fourth square Pyramidalzahl 30, they are the sums of the first square numbers .

In the following denote the -th quadratic pyramidal number. ${\ displaystyle \ operatorname {Pyr} _ {4} (n)}$${\ displaystyle n}$

It applies

${\ displaystyle \ operatorname {Pyr} _ {4} (n) = \ sum _ {i = 1} ^ {n} i ^ {2} = 1 ^ {2} + 2 ^ {2} + 3 ^ {2 } + 4 ^ {2} + \ ldots n ^ {2} = {\ frac {n (n + 1) (2n + 1)} {6}} = {\ frac {2n ^ {3} + 3n ^ { 2} + n} {6}}}$.

The first quadratic pyramidal numbers are

0, 1, 5, 14, 30, 55, 91, 140, 204, 285, 385, ... (sequence A000330 in OEIS )

For some authors, the zero is not a quadratic pyramidal number, so the sequence of numbers only begins with the one.

## Generating function

The generating function of the quadratic pyramidal numbers is

${\ displaystyle {\ frac {x (x + 1)} {(x-1) ^ {4}}} = \ sum _ {n = 0} ^ {\ infty} \ operatorname {Pyr} _ {4} ( n) x ^ {n} = \ mathbf {1} x + \ mathbf {5} x ^ {2} + \ mathbf {14} x ^ {3} + \ mathbf {30} x ^ {4} + \ mathbf { 55} x ^ {5} + \ ldots}$

## Relationships to other figured numbers, further representations

It applies

${\ displaystyle \ operatorname {Pyr} _ {4} (n) = {\ binom {n + 2} {3}} + {\ binom {n + 1} {3}}}$

with the binomial coefficients and

${\ displaystyle \ operatorname {Pyr} _ {4} (n) = {\ frac {1} {4}} \ operatorname {Pyr} _ {3} (2n)}$

with the tetrahedral numbers . ${\ displaystyle \ operatorname {Pyr} _ {3} (n)}$

In addition, with the -th triangular number: ${\ displaystyle \ Delta _ {n}}$${\ displaystyle n}$

${\ displaystyle \ operatorname {Pyr} _ {4} (n) = \ Delta _ {n} +2 \ operatorname {Pyr} _ {3} (n-1)}$

## Others

• 4900 is adjacent to the trivial case 1, the only number that is at the same time a perfect square and a square pyramidal number: . This was proven by GN Watson in 1918.${\ displaystyle \ operatorname {Pyr} _ {4} (24) = 4900 = 70 ^ {2}}$
• The sum of the reciprocal values ​​of all quadratic pyramidal numbers is${\ displaystyle \ sum _ {n = 1} ^ {\ infty} \ operatorname {Pyr} _ {4} (n) ^ {- 1}}$
${\ displaystyle \ sum _ {n = 1} ^ {\ infty} {\ frac {6} {n (n + 1) (2n + 1)}} = 18-24 \ ln (2) = 1 {,} 3644676665 \ ldots}$   (Follow A159354 in OEIS )

## Derivation of the empirical formula

The difference between two consecutive square numbers is always an odd number. More precisely, because of the fact that the difference between the -th and -th square number is. This gives the following scheme: ${\ displaystyle k ^ {2} - (k-1) ^ {2} = 2k-1}$${\ displaystyle k}$${\ displaystyle (k-1)}$${\ displaystyle 2k-1}$

${\ displaystyle {\ begin {array} {ccccccccccccccc} 0 && 1 && 4 && 9 && 16 && 25 & \ ldots & (n-1) ^ {2} && n ^ {2} \\ & 1 && 3 && 5 && 7 && 9 && \ ldots && 2n-1 & \ end {array}}}$

A square number can thus be represented as the sum of odd numbers, ie it applies . This sum display is now used to display the sum of the first square numbers by means of a set of odd numbers arranged in a triangle. The sum of all the odd numbers in the triangle corresponds exactly to the sum of the first square numbers . ${\ displaystyle n ^ {2} = \ sum _ {i = 1} ^ {n} (2i-1)}$${\ displaystyle n}$${\ displaystyle n}$

${\ displaystyle {\ begin {array} {rcccccccc} \ scriptstyle 1 ^ {2} \ scriptstyle = \, \ vline & 1 &&&&&&& \\\ scriptstyle 2 ^ {2} \ scriptstyle = \, \ vline & 1 & 3 &&&&&& \\\ scriptstyle 3 ^ {2} \ scriptstyle = \, \ vline & 1 & 3 & 5 &&&&& \\\ scriptstyle 4 ^ {2} \ scriptstyle = \, \ vline & 1 & 3 & 5 & 7 &&&& \\\ scriptstyle 5 ^ {2} \ scriptstyle = \, \ vline & 1 & 3 & 5 & 7 & 9 &&& \\\ vdots quad \ vline & \ vdots &&&&& \ ddots && \\\ scriptstyle (n-1) ^ {2} \ scriptstyle = \, \ vline & 1 & \ cdots &&&& \ cdots & \ scriptstyle 2n-3 & \\\ scriptstyle n ^ {2 } \ scriptstyle = \, \ vline & 1 & \ cdots &&&& \ cdots & \ scriptstyle 2n-3 & \ scriptstyle 2n-1 \ end {array}}}$

Now you arrange the same odd numbers in two other ways to form a congruent triangle.

${\ displaystyle {\ begin {array} {cccccccc} \ scriptstyle 2n-1 &&&&&& \\\ scriptstyle 2n-3 & \ scriptstyle 2n-3 &&&&& \\\ vdots && \ ddots &&&& \\ 9 & \ cdots & \ cdots & 9 &&&& \\ 7 & \ cdots & \ cdots & 7 & 7 &&& \\ 5 & \ cdots & \ cdots & 5 & 5 & 5 \\ 3 & \ cdots & \ cdots & 3 & 3 & 3 & 3 \\ 1 & \ cdots & \ cdots & 1 & 1 & 1 & 1 & 1 \\\ hline \ scriptstyle = n ^ {2} & \ scriptstyle = (n -1) ^ {2} & \ cdots & \ scriptstyle = 5 ^ {2} & \ scriptstyle = 4 ^ {2} & \ scriptstyle = 3 ^ {2} & \ scriptstyle = 2 ^ {2} & \ scriptstyle = 1 ^ {2} \ end {array}}}$    ${\ displaystyle {\ begin {array} {cccccccc} 1 &&&&&&& \\ 3 & 1 &&&&&&& \\ 5 & 3 & 1 &&&&& \\ 7 & 5 & 3 & 1 &&&& \\ 9 & 7 & 5 & 3 & 1 &&& \\\ vdots &&&&& \ ddots & \ && \\\ script\ 2n-1 & \ scriptstyle 2n-3 &&&& \ cdots & 3 & 1 \\\ hline \ scriptstyle = n ^ {2} & \ scriptstyle = (n-1) ^ {2} & \ cdots & \ scriptstyle = 5 ^ {2} & \ scriptstyle = 4 ^ {2} & \ scriptstyle = 3 ^ {2} & \ scriptstyle = 2 ^ {2} & \ scriptstyle = 1 ^ {2} \ end {array}}}$

If you put these triangles on top of each other, then the sum of every column consisting of three numbers is always constant and there are such columns. So the sum of all the odd numbers of the three triangles is exactly three times the sum of the first square numbers . The following applies: ${\ displaystyle 2n + 1}$${\ displaystyle 1 + 2 + \ ldots + n = {\ tfrac {n (n + 1)} {2}}}$${\ displaystyle {\ tfrac {n (n + 1) (2n + 1)} {2}}}$${\ displaystyle n}$

${\ displaystyle \ operatorname {Pyr} _ {4} (n) = {\ frac {n (n + 1) (2n + 1)} {6}}}$