The number of topologies on a set with n elements is equal to the nth Bell number, which we denote by Bn.
The Bell numbers can be defined recursively as follows:
B1 = 1
For n > 1,
Bn = sum[k=1 to n] C(n-1, k-1) Bk
where C(n, k) is the binomial coefficient, which counts the number of ways to choose k elements from a set of n elements.
Using this recursive formula, we can calculate the Bell numbers as follows:
B1 = 1
B2 = C(1,0) B1 + C(1,1) B1 = 1+1 = 2
B3 = C(2,0) B1 + C(2,1) B2 + C(2,2) B1 = 1+2+1 = 4