How to calculate the probability of drawing numbers under certain constraints We have numbers $1,2,3,\dots, n$, where $n$ is an integer, and we select $d$ distinct numbers from them, $i_1,i_2,\dots,i_d$. What is the probability that there exist at least two numbers whose difference is less than $k$, i.e $|i_{h}-i_{j}|<k$, for any $h,j \in \{1,2,3,\dots,d\}$
I am thinking about the total number which satisfies the constraint should be $(n-k+1)(k-1)\binom{n-2}{d-2}$, and the total number is $\binom{n}{d}$,
so the answer should be $\dfrac{(n-k+1)(k-1)\binom{n-2}{d-2}}{\binom{n}{d}}$
Thank you in advance

Comment.
For, $n = 52,\;  d = 5,\;  k = 3,\;$ I get 
 (n-k+1)*choose(k,2)*choose(n-2,d-2)/choose(n,d)
 ## 1.131222

which is not a probability. So it seems there is an error somewhere.
[OP now edited. Answer is now a probability, and disagrees with
simulation below and @Eric's Answer. OK for $\le k$.]
 (n-k+1)*(k-1)*choose(n-2,d-2)/choose(n,d)
 ## 0.7541478

In case it helps, I simulated this particular version of the
experiment 100,000 times using R statistical software, with the following results--accurate
to roughly two places. I hope having approximate answers as a
reality check will be useful to you or someone else in deriving
an analytic solution.
 m = 10^5;  n = 52;  d = 5;  k = 3;  x = numeric(m)
 for(i in 1:m) {
   s = sample(1:n, d)
  x[i] = sum(diff(sort(s)) < k) }
 mean(x >= 1)
 ##  0.58428  # approx prob at least one 'small diff'

Here are a couple of individual runs, as a proof of concept for the simulation:
 s = sample(1:n, d);  s
 ##  8 27 32 10 29
 sort(s)
 ##  8 10 27 29 32
 diff(sort(s))
 ##  2 17  2  3
 sum(diff(sort(s)) < k)
 ##  2

 s = sample(1:n, d);  s
 ##  9 25 21 50 30
 sort(s)
 ##  9 21 25 30 50
 diff(sort(s))
 ##  12  4  5 20
 sum(diff(sort(s)) < k)
 ## 0

Addendum: Here is @Eric's formula for this particular case:
 num = choose(n,d) - choose(n + k + d - k*d - 1, d)
 den = choose(n,d)
 num/den
 ## 0.5821375  # Above agrees with this within simulation error

