# My Journey with Figurate Numbers

The Spark

The first thing that caught my attention was a book by Fernando Zalamea Traba, a Colombian mathematician and philosopher, in which he discussed the vision of Pavel Florensky, a Russian Orthodox priest with a unique perspective on mathematics, art, and philosophy. I found a beautiful quote that I’ll copy below:

If it is possible to represent space on a plane, this can only be done by destroying the form of what is represented” (Florensky, 2003, cited in Zalamea, 2010, p. 39).

Figurate Number in Polar Coordinates

Pentagonal and Triangular Numbers

The Foundation

My curiosity led me to Greece, where I studied the solids and figurate numbers in Plato. From there, I came across a Beamer presentation of the book Figurate Numbers by Michel Deza and Elena Deza (2012). This book is one of the most systematic compendium of this topic through recursive and iterative definitions and their proofs.

For example, the definition of hypertetrahedron numbers in kk dimensions is the following (my admiration for the Gamma functions stems from Artin’s profound insights):

Hk(n)=Γ(n+k)Γ(n)Γ(k+1)H_k(n) = \frac{\Gamma(n+k)}{\Gamma(n) \Gamma(k+1)} =0tn+k1et dt(0tn1et dt)(0tket dt).= \frac{\int_0^\infty t^{n+k-1} e^{-t} \ dt}{\left( \int_0^\infty t^{n-1} e^{-t} \ dt \right) \left( \int_0^\infty t^k e^{-t} \ dt \right)}.

This work became the foundation for creating figurate number generators in both Ruby and Python. What is wonderful about this book is that it covers everything from plane and spatial numbers to multidimensional numbers.

Implementation in Ruby and Sonic Pi

Inspired by Ziffers, an algorithmic composition and code improvisation system by Miika Alonen, I integrated figurate numbers into Sonic Pi to generate sonic representations of these sequences. I sent him a couple of pull requests with some sequences, like the dodecahedral numbers, which he later merged into Ziffers. In that enthusiasm, I decided to create figurate_numbers, a complete version of the book in Ruby, which currently has over 4,200 downloads. With it, you can experiment with the sonification of the sequences using different musical algorithms and parameters.

# Sonic Pi
require "<PATH>/figurate_numbers.rb"

amp_seq = SpaceFigurateNumbers.centered_hendecagonal_pyramidal
100.times do
  # p-adic amplitude control
  sample :bd_sone, amp: ArithTransform.padic_norm(amp_seq.next, 3)
  sleep 0.25
end

Implementation in Python

It didn’t take long before I created a version in Python, with the idea that it would be useful for scientific calculations and mathematical exploration. To date, over 13,000 people have downloaded figuratenum, showing the community’s interest in applying mathematical concepts to various fields.

Finally, I adapted generators to a more computationally efficient form:

def k_dimensional_hypertetrahedron(k: int) -> Generator[int]:
    """Optimized version using iterative
    binomial coefficient update for better performance."""
    delta = 1
    bin_coeff = 1
    while True:
        yield bin_coeff
        bin_coeff = bin_coeff * (delta + k) // delta
        delta += 1

One of the Thousands of Geometries

Recently, I came across an autobiographical note by Rogelio Pérez Buendía, a Mexican mathematician, in which he spoke about spirographs, cardioids, and coffee cups. This led me to explore timetables and modular arithmetic. This prompted a new question:

What would happen if we applied this geometric mapping to figurate numbers?

Thus, a new phase of the library was born, revealing fascinating mathematical symmetries in the representations of figurate numbers, and creating truly beautiful visualizations with just a few algorithms using matplotlib and numpy.

Figurate Number in Polar Coordinates

Centered Hexagonal Pyramidal

What’s Next?

Today, I share this journey between mathematics, art, and music, with the satisfaction of having connected with a community passionate about these topics. I’m thinking about what other types of mappings could be useful to represent these beauties.

You can try both libraries here:

pip install figuratenum[figurate-viz]
gem install figurate_numbers
© 2025 Edgar Delgado Vega