The ultimate purpose of mathematics is to reveal the Truth bout the Soul:
our souls are a part of Premodal Buddha (or God).
One can give another definition of mathematics from this.
Mathemtiks is to attain the wisdom about of the Truth of numbers.
In other words, mathematics is a part of Enlightenment.
To study mathematics is a part of Prajna-Paramita (Perfection of WIsdom).
Mathematician Kiyosi Oka studied the relation of mathematics and Buddhism.
To study mathematics demands the freedom and peace of mind.
To discover the truths of mathematics is equal to attain the wisdom in unconsciousness mind.
These are parts of the Noble Eightfold Path and the Six Paremetas.
Mathematics is profoundly related to Buddhism.