How can I generate n random numbers from (a, b) interval such that these numbers are densely concentrated around min and max and getting progressively sparse in the middle.
Use a beta-distribution with both parameters equal and less than one. For instance:
shape1 <- 1/4 shape2 <- 1/4 set.seed(123) hist(rbeta(1e4,shape1,shape2))
This will give you numbers between 0 and 1. Shift and scale these to match your desired $a$ and $b$.
The NIST Gallery of Distributions is often useful to find a distribution