Some partial solution:
@icecolbeveridge So this was a fun distraction! As several people figured out, the distribution is a double sum with very interesting limits:
\(p(X=x) = \frac{1}{400} \sum\limits_{y=\max(x, 21)}^{40}\sum\limits_{z=1}^{\min(x, 20)}\frac{1}{y - z + 1}\)
I uploaded a Jupyter notebook with my results and simulations:
https://github.com/dataNerd23/stochUnifBoundsProb
P.S.-I thought I could simplify the distribution with WolframAlpha, but alas, this is what it gave me:
Some partial solution:
@sojournTime I have \( \sum_{n=1}^N \sum_{k=22-n}^{41-n} \frac{1}{k} \), which I think amounts to the same thing. WA doesn't simplify it for me, either.