I apologize if this question might not sound feasible. I'm not a math major, but I have knowledge of basic math. I want to find this solution purely out of curiosity. So my thought process was: first assume that there are n numbers in the sequence, and the random number generator has a range of 1 to k (both inclusive). So, the probability of the first two numbers being different would be $1*\frac{(k-1)}{k}$. Then, the probability of the third number in the sequence being different would be $\frac{(k-2)}{k}$ as the first two numbers are defined and there are k-2 numbers left. Then, it would be $\frac{(k-3)}{k}$ for the fourth number, and so on. So for all the n numbers in the sequence, the probability that they would all be different would be:
$\frac{(k-1)(k-2)(k-3)...(k-n+1)}{k^{(n-1)}}$
Since I want the probability of repetition, I'll subtract this from 1, and if I multiply and divide the fraction with $k(k-n)!$ I get this as the final expression:
$1- [\frac{k!}{\{k^{n}(k-n)!\}}]$
Now for an infinite sequence, n and k both have to tend to infinity. So this is what I finally get:
$\lim_{n\to \infty k\to \infty} (1- [\frac{k!}{\{k^{n}(k-n)!\}}])$
Can this be solved? Is my formulation even correct? Any advice or help would be highly appreciated!