I was playing with my Python implementation of some combinatorial functions, specifically those that return the number of combinations of $r$ elements from a set of cardinality $n$:
Without repetition: $\frac{n!}{r!(n-r)!}$
With repetition: $\frac{(n+r-1)!}{r!(n-1)!}$
For convenience, I will refer to the former function as $C(n, r)$, and the latter as $Cr(n, r)$.
While doing this, I found something fascinating:
$$\lim_{a\to\infty} {Cr(a^2, a) \over C(a^2, a)} = e$$
Those who know Python can verify the correctness of my implementation of the functions:
def permutation_count(n, r, repetitions=False):
"""Returns the number of permutations of 'r' elements from a set of
cardinality 'n'."""
if repetitions:
return n**r
else:
return reduce(lambda x, y: x * y, range(n, n - r, -1))
def combination_count(n, r, repetitions=False):
"""Returns the number of combinations of 'r' elements from a set of
cardinality 'n'."""
if repetitions:
n = n + r - 1
return permutation_count(n, r) // factorial(r)
# My function:
def f(a):
return combination_count(a**2, a, True) / combination_count(a**2, a, False)
I observed the above result by simply evaluating this function for increasingly large integer values. I will send any who request it a text file containing the results of the function for said values.
I posted this here for these reasons:
1. There's the possibility, however small, that I am the first to discover this equation.
2. I enjoy math and I'm fairly knowledgeable regarding it, but I'm definitely not an expert, and I have no idea what the significance of this discovery is. Someone more knowledgeable than myself might consider it trivial, as it may logically proceed from some known mathematical property.
3. If this discovery is in fact significant, it could be useful to those more knowledgeable than myself. I would also like to understand why it is significant, in that case.