I had this problem where I wanted to generate random variables (discrete) in a way that certain numbers were more probable than others (basically geometric) but since I wanted to use this number as an array index, I wanted it to be bounded between $[0,n)$, where $n$ could be anything between $5000$ and $10000$ (size of array).
But geometric is not bounded, it can take any value from $0$ to $\infty$. So I was thinking if generated a geometric random variable and took a mod with $n$, I would get what I need but I want to know how will it change the probability distribution i.e. what is the probability distribution of this new random variable $Y = X$ (mod $n$) if $X$ is a geometric random variable with $p$ of, say, $0.5$?
Also, if I may, how will the mod affect a random variable in general?