Leibniz’s harmonic triangle in 3D

An LLM assisted digestion of some beautiful math

Math
Visualizing the parallels between Leibniz’s harmonic triangle and Pascal’s triangle, in 2D and in 3D.
Author

Kolen Cheung

Published

October 19th, 2026

John D. Cook wrote about Leibniz’s harmonic triangle last week (Cook 2026). The first column is the harmonic series, and each entry is the difference of the entries to its west and northwest:

\[ L(r,c)=L(r-1,c-1)-L(r,c-1),\qquad L(r,c)=\frac{1}{r\binom{r-1}{c-1}}, \]

which is actually a value of the beta function (Ayoub 1987). Looking at the formula, I think it would be nicer to use the first column and the diagonal as the axes. So I tried that with an LLM, and then kept going: take the reciprocals, and then go up one dimension. It turns out all of these are already in the literature (see the references), so this post is mainly about visualizing them, which I find makes the relations much easier to see than the formulas.

On the lattice

Let’s put the origin at the top of the triangle, and measure along the two edges, \(x = c-1\) along the diagonal and \(y = r-c\) down the first column. Then

\[ L(x,y)=\frac{x!\,y!}{(x+y+1)!}. \]

Row \(r\) is now \(x+y=r-1\), and the symmetry within a row is simply \(L(x,y)=L(y,x)\). Cook’s recurrence becomes

\[ L(x,y)=L(x+1,y)+L(x,y+1), \]

i.e. each entry is the sum of the two below it. Now compare it with Pascal’s triangle in the same coordinates, \(P(x,y)=\binom{x+y}{x}\), where each entry is the sum of the two above it:

\[ P(x,y)=P(x-1,y)+P(x,y-1). \]

So it is basically the same lattice, just going in the other direction.

Now if we take the reciprocals, \(A=1/L\), they are all integers,

\[ A(x,y)=\frac{(x+y+1)!}{x!\,y!}=(x+y+1)\binom{x+y}{x}, \]

which is the \(r\)-th row of Pascal’s triangle times \(r\). And the recurrence becomes

\[ \frac{1}{A(x,y)}=\frac{1}{A(x+1,y)}+\frac{1}{A(x,y+1)}. \]

This is what I plot below: the integers, as they are easier to read, and the relation between them in reciprocals. I rotate the lattice such that the apex is at the top and the \(x\) and \(y\) axes go down at 90° to each other, so that it still looks like the usual triangle.

You can switch between the reciprocals of the harmonic triangle and Pascal’s triangle, on the same lattice. Click on a number to see how it is made from its neighbours: from the two below it for the harmonic triangle, and from the two above it for Pascal’s.

Why does the sum go down instead of up? You can see it from the beta integral (Ayoub 1987):

\[ L(x,y)=\int_0^1 t^x(1-t)^y\,dt, \]

Multiplying the integrand by \(1=t+(1-t)\) splits it into \(L(x+1,y)+L(x,y+1)\). And the symmetry is just the substitution \(t\mapsto 1-t\).

Up a dimension

Here \(t\) and \(1-t\) are basically the two barycentric coordinates of a line segment. So what if we use the three barycentric coordinates of a triangle instead, \(t+s+u=1\)? The same trick gives you an array in three coordinates,

\[ H(x,y,z)=2\iint_{t,\,s\,\ge 0,\ t+s\le 1} t^x s^y (1-t-s)^z\,dt\,ds=\frac{2\,x!\,y!\,z!}{(x+y+z+2)!}, \]

and now there are three directions in its recurrence:

\[ H(x,y,z)=H(x+1,y,z)+H(x,y+1,z)+H(x,y,z+1). \]

Its reciprocals are again integers, and they are actually multinomial coefficients,

\[ A(x,y,z)=\frac{(x+y+z+2)!}{2!\,x!\,y!\,z!}, \]

On the Pascal side, the counterpart one dimension up is Pascal’s tetrahedron, \(P(x,y,z)=\frac{(x+y+z)!}{x!\,y!\,z!}\), where each entry is the sum of the three above it. In \(d\) coordinates, the harmonic array is \((d-1)!\,x_1!\cdots x_d!/(x_1+\dots+x_d+d-1)!\), and each entry is the sum of its \(d\) neighbours below. These pyramids have already been studied by Rodríguez and Tsallis, in any dimension, and they call the recurrence the generalized Leibniz rule (Rodríguez and Tsallis 2012). Later they also connect them to the Dirichlet distribution (Rodríguez and Tsallis 2014), which is the multivariate version of the beta distribution, and these integrals are its moments.

Below is the pyramid, pointing down like the triangles, i.e. the apex is at the top, and the layer \(x+y+z=N\) is a triangle of numbers \(N\) steps below it. You can drag to rotate it, and use the slider to choose how many layers to show. The far side fades, and so does everything that is not part of the relation of the selected number. You can also switch between the harmonic pyramid and Pascal’s tetrahedron, and between showing all the layers or only two neighbouring layers, which is easier to read when there are more layers.

Slicing the pyramid

Now let’s slice Pascal’s tetrahedron at \(z=c\). You get \(\frac{(x+y+c)!}{x!\,y!\,c!}\), which is Pascal’s triangle at \(c=0\), and actually the harmonic triangle at \(c=1\):

At \(c=2\), it is the face \(z=0\) of the harmonic pyramid. Its rows are the rows of the harmonic triangle times \(1, \frac{3}{2}, 2, \frac{5}{2}, \dots\), so the factor is different in each row. That is why the two-term relation of the triangle doesn’t hold on the face: it falls short by exactly the third term, from \(z=1\).

What about slicing horizontally? A layer \(x+y+z=N\) of the harmonic pyramid is the same layer of Pascal’s tetrahedron times \(\binom{N+2}{2}\), which is the number of points in the layer. This is the same as in 2D, where the \(r\)-th row of the harmonic triangle is Pascal’s row times \(r\). Here you can rotate the two together:

So the reciprocal triangle shares a lot of properties with Pascal’s triangle, and visually it is like Pascal’s triangle working in the reverse direction, with a reciprocal relation instead.

References

Ayoub, Ayoub B. 1987. “The Harmonic Triangle and the Beta Function.” Mathematics Magazine 60 (4): 223–25. https://doi.org/10.2307/2689343.
Cook, John D. 2026. “Harmonic Triangle.” John D. Cook | Applied Mathematics Consulting, October 13. https://www.johndcook.com/blog/2026/10/13/harmonic-triangle/.
Rodríguez, A., and C. Tsallis. 2012. “A Dimension Scale-Invariant Probabilistic Model Based on Leibniz-Like Pyramids.” Journal of Mathematical Physics 53 (2): 023302. https://doi.org/10.1063/1.3688312.
Rodríguez, A., and C. Tsallis. 2014. “Connection Between Dirichlet Distributions and a Scale-Invariant Probabilistic Model Based on Leibniz-Like Pyramids.” Journal of Statistical Mechanics: Theory and Experiment 2014 (12): P12027. https://doi.org/10.1088/1742-5468/2014/12/P12027.