Simulation of the birthday problem in R