St. Augustine, City of God, Book XII, Chapter 18:
As for their other assertion, that God's knowledge cannot comprehend things infinite, it only remains for them to affirm, in order that they may sound the depths of their impiety, that God does not know all numbers. For it is very certain that they are infinite; since, no matter of what number you suppose an end to be made, this number can be, I will not say, increased by the addition of one more, but however great it be, and however vast be the multitude of which it is the rational and scientific expression, it can still be not only doubled, but even multiplied. Moreover, each number is so defined by its own properties, that no two numbers are equal. They are therefore both unequal and different from one another; and while they are simply finite, collectively they are infinite. Does God, therefore, not know numbers on account of this infinity; and does His knowledge extend only to a certain height in numbers, while of the rest He is ignorant? Who is so left to himself as to say so?...Far be it, then, from us to doubt that all number is known to Him whose understanding, according to the Psalmist, is infinite. The infinity of number, though there be no numbering of infinite numbers, is yet not incomprehensible by Him whose understanding is infinite. And thus, if everything which is comprehended is defined or made finite by the comprehension of him who knows it, then all infinity is in some ineffable way made finite to God, for it is comprehensible by His knowledge.
This was one of Georg Cantor's favorite passages; having worked out the basics of his theory of transfinites, he was excited to find Augustine had already said something that anticipated his own view. Cantor saw his theory as having theological implications; transfinites are increasing infinites, and, by the same general line of reasoning that had originally led him to conclude that transfinites were really numbers, he took this to imply that there also had to be an absolute infinite incapable of any increase, which he attributed to the divine intellect. He corresponded with a number of Catholic philosophers, particularly Thomists, over the matter; most of them were a little skeptical of the theological features of it, but were also much more encouraging about both the mathematics and the theology than many of Cantor's fellow mathematicians; with respect to his mathematical colleagues, he mostly felt isolated, with only a few like Dedekind being even willing to try to understand his work. But if the mathematicians were not willing to receive Cantor's theory of the infinite, Catholic philosophers and theologians were at least willing to discuss it, so he went to the philosophers and theologians.