"The Thomistic Argument from Contingency: Mathematical Proof of God's Existence
Saint Thomas Aquinas gave a wonderful proof of God's Existence that is generally referred as the Argument from Contingency. It is the purpose of this article to propose this proof anew in a Mathematical Form for the edification of Christians and the destruction of Atheism.
Contents
1 Mathematical Formulation of the Contingency Principle
2 Further Elaboration/Explanation of the formulation
3 Corollary from the Mathematical Formulation of the Contingency Argument
4 References
Mathematical Formulation of the Contingency Principle
St. Thomas' argument from contingency may be formulated like this: if each contingently existing being considers himself Bn, then, because he exists contingently, he depends for his existence on a prior being B(n-1). Now, B(n-1) likewise, if it is contingent, depends on B(n-2). Nevertheless, this series cannot go on until Infinity. At a certain time, we will arrive at a B1, the First Being in existence, and since there is no "zeroth" Being or B0, B1 exists Necessarily, i.e. is not a contingent being. This was Aquinas' Third Way, under Question 2, Article 3 in the Summa Theologica[1]
Further Elaboration/Explanation of the formulation
Let's use the operator ~= to symbolize "is contingent/dependent on".
B(n) is Contingent, i.e. B(n)~=B(n-1)
But B(n-1), if it is contingent, is dependent on B(n-2), i.e. B(n-1)~=B(n-2)
Now, it is very clear this series cannot go on indefinitely.
At a certain time, we will come to B1, the First Being in Existence. It must now be observed that there is no such thing as a "0th" Being in Existence. It therefore follows clearly, logically, and mathematically that B1 is not a contingent being.
we now define the operator !~= to symbolize "is NOT contingent/dependent on".
Therefore, since there is no B0, then B1 !~= "B0", i.e. in words, B1 is a Necessarily Existent Being, not Contingent but Necessary.
Corollary from the Mathematical Formulation of the Contingency Argument
Now beings that begin and cease to exist, like human beings, clearly are contingent and not necessary. We showed above that B1 is not contingent being.
Contingent beings are thus temporal beings, because there is a certain moment in time when we began to exist and when we will cease to exist. But what we proved above about the Necessarily Existent Being shows He is a Being of a different order. He is an Eternally Existent Being, one who has always existed even before the beginning of time. How do we know this? Because B1 is Necessarily Existent, as we showed above.
Now, if contingent being are temporal beings, and the First Being/First Cause is non-contingent, He is thus Non-Temporal, i.e. Eternal.
We therefore arrive, by a series of few logical and mathematical steps, at an Eternal First Being who created our temporal Universe."
From:
https://www.conservapedia.com/The_Thomistic_Argument_from_Contingency:_Mathematical_Proof_of_God's_Existence