I generated 1.000.000 random integers in the range from 0 to 1.000.000 (using rand() in c++ and random.randrange() in python) and both code got approximately 632000 unique numbers.
I noticed $1 - e^{-1} = 0.6321$.
Does $e$ involve in this? If so, why?
Unique number | Total numbers in array
632413 1000000
632088 1000000
631594 1000000
6305 10000
6319 10000
But i failed to see the correlation between the number of unique numbers in a randomly generated array and the probability mentioned above.
Can you show me the similarity?
– Era Aug 05 '21 at 12:13