It is known that the average number of divisors, calculated over all positive integers between $1$ and $N$, can be expressed using the classical Dirichlet formula as
$$\frac{1}{N} \sum_{n=1}^N d(n)= \log(N)+2 \gamma -1+O(N^{-\frac{1}{2}})$$
where $\gamma$ is the Euler's constant and $d(n)$ is the divisor function. I would like to know whether there is a similar asymptotic formula if we restrict the calculation, for any $n$, to a narrower range for the divisors. In particular, given $n$, we can consider only the divisors $<c \sqrt{n}\,$, where $c$ is a positive real number.
Let us call this restricted divisor function $d(n,c)\,$. For $c=1\,\,$, the resulting summatory function trivially becomes
$$\frac{1}{N} \sum_{n=1}^{N} d(n,1)= \frac{1}{2} \log(N)+ \gamma -\frac{1}{2}+O(N^{-\frac{1}{2}})$$
However, for $c \neq 1 \,$ I was not able to prove a general asymptotic formula. After some calculations, I guess that the constant term varies by $\log(c)$, but I would be happy to have a formal proof.
A simple change of summations gives a usable, albeit crude result:
$$\sum_{n=1}^N d(n,c) = \sum_{n=1}^N \sum_{\substack{d\mid n\\d<c\sqrt{n}}} 1 = \sum_{d=1}^{c\sqrt{N}} \sum_{\substack{d^2/c^2 < n \le N\\ n \equiv 0 \pmod d}} 1 = \sum_{d=1}^{\lfloor c\sqrt{N} \rfloor} \big\lfloor \frac{N}{d} \big\rfloor - \big\lfloor \frac{\lceil d^2/c^2 \rceil}{d} \big\rfloor \\ = \sum_{d=1}^{\lfloor c\sqrt{N} \rfloor} (\frac{N}{d} - \frac{d}{c^2}) + O(c\sqrt{N}) \\ = N(\log(c\sqrt{N}) + \gamma + O((c\sqrt{N})^{-1}) - (\tfrac12 N + O(c^{-1}\sqrt{N}) ) + O(c\sqrt{N}).$$
Thus the average value of $d(n,c)$ is $\frac12 \log N + \log c + \gamma - \frac12 + O_c(N^{-1/2})$, where the subscript in $O_c$ connotes that the implied constant may depend on $c$ (in this case it looks to be bounded by $O(c + c^{-1})$). Perhaps the error term can be made more uniform in $c$ by refining this calculation via Dirichlet's hyperbola method.