Extension of the Birthday Problem How do you find the expected number of people (or the expected number of pairs) among the n that share their birthday within r days of each other?
For the regular birthday problem, it's $n\left(1-(1-1/N)^{n-1}\right)$ expected people or ${n\left(1-(1-1/N)^{n-1}\right) \choose 2}$ pairs (see https://math.stackexchange.com/a/35798/39038). In this link, is it correct to derive the expected number of people among the n that share their bday within r days of each other using the same steps, but just with replacing $\frac{1}{N}$ with $\frac{1+2r}{N}$ ? In other words, is $$n\left(1-(1-(2r+1)/N)^{n-1}\right) \choose 2$$ correct for the expected number of pairs?

It is accurate in the limit that you expect pairs to be rare.  The corrections come when one person is a member of more than one pair.  As you expand the window from $0$ to $r$ the corrections become more important.
