Math is everywhere. It’s a phrase teachers often tell stubborn students who ask the reason for learning how to solve complex problems. And on March 9 in the Shea Auditorium, that phrase didn’t just apply to music; it actually inspired its creation.

That Monday’s New Music Series concert, made up of performances from William Paterson’s Percussion Ensemble and New Music Ensemble, included a piece inspired by a discussion between composer Payton MacDonald and math professor David Nacin. The subject: the Padovan sequence.

“He’s an amazing guy,” MacDonald said. “He’s not only a genius in math theory, but he’s also able to communicate his passion and love for math and teach it to people who don’t know much about it.”

Before MacDonald and the ensemble performed the piece, titled (n) = P (n-2) + P (n-3) after the formula that represents the sequence, Nacin gave a presentation explaining the Padovan sequence. The sequence was originally used to determine how different numbers of syllables could be divided up in lines of poetry. However, it can also be used to divide up rhythmic beats in music.

If the numbers produced by the sequence are given as the lengths of sides on triangles, then those triangles will form a spiral when grouped together.

“[MacDonald’s piece] is musical proof of mathematical reason,” Nacin said.

Throughout the piece, performed by 14 people including MacDonald, the musicians tapped triangles varying in size. As they played, they moved all over the stage and the auditorium, moving closer together and farther apart. This continually altered the loudness, softness and length of the sounds. Part of the piece was even improvised.

However, the rhythmic divisions, the number of times the triangles were struck by each player and the length of musical rolls — how long a sound is sustained — were all determined by the Padovan sequence.