Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I'm not sure why you ask for "distinct integers" ... That surely comes from a previous (and equivalent) problem statement, where one samples with replacements (leaving the probabilities unchanged) and stops after getting $n$ different values. math.stackexchange.com/questions/4096509/…
Regarding your last points (structure and capturing), real webs often have different types of silk to attain those different purposes. In particular, in orbital webs the radial threads are structural (stronger) while spirals are designed for capture (only they are sticky, as you can test by touch). Webs are truly impressive.