I have previously asked the question [A truncated divisor function sum](https://mathoverflow.net/questions/92967/a-truncated-divisor-function-sum)
where the sum
$$
S\_f(x)=\sum\_{n\leq x} \min\{f(x),d(n)\}\quad (1)
$$
was of interest, and it was answered satisfactorily.


Here, I am interested in estimating the following quantity
$$
S\_a(x,m)=\sum\_{n\leq x} \#\{d: d|n~\mathrm{and}~d\leq m\}^a
$$
so the divisors are restricted in size, or restricted to the interval $[1,m]$ not in ``number'' as in (1).


When $a=1,$ this is straightforward (as far as obtaining the main term), since the sum can be evaluated horizontally
$$
S\_1(x,m)=\sum\_{d\leq m} \lfloor x/d \rfloor=\left[\sum\_{d\leq m} \frac{x}{d}\right]+O(m)=x \log m + O(m),
$$
and typically I'd be interested in relatively small values of $m$ in terms of $x$.


What about $a\neq 1$? In particular, $a=1/2,$ or $a=2,3,$ etc. How can one estimate those sums?



Moments of number of interval restricted divisors
We assume $m\leq x$. Your $S\_1(x,m)$ is in fact, $x\log m + O(m)$.


This answer finds an estimate of $S\_2(x,m)$.


$$
\begin{align}
S\_2(x,m)&=\sum\_{n\leq x} \left(\sum\_{d|n, d\leq m} 1 \right)^2=\sum\_{d\_1\leq m, d\_2\leq m} \sum\_{n\leq x, [d\_1,d\_2]|n}1\\
&=\sum\_{d\_1\leq m, d\_2\leq m} \frac x{[d\_1,d\_2]}+O(m^2),
\end{align}
$$
where $[d,u]=\mathrm{lcm}(d,u)$.


To find an estimate of the first sum, let $[d\_1,d\_2]=d\_1d\_2/(d\_1,d\_2)$ where $d=(d\_1,d\_2)=\mathrm{gcd}(d\_1,d\_2)$, we write $d\_1=dk$, $d\_2=dl$ with $(k,l)=1$. To establish $(k,l)=1$, we use the identity $\sum\_{d|n}\mu(d) = \delta\_1(n)$, where $\delta\_1(n)=1$ when $n=1$, $0$ otherwise. Then $k=uv$, $l=uw$, so that $d\_1=duv$, $d\_2=duw$, $[d\_1,d\_2]=dkl=du^2vw$. Then


$$
\begin{align}
\sum\_{d\_1\leq m, d\_2\leq m} \frac1{[d\_1,d\_2]}&= \sum\_{duv\leq m, duw\leq m} \frac{\mu(u)}{du^2vw} \\
&=\sum\_{u\leq m}\sum\_{d\leq m/u} \frac{\mu(u)}{du^2} \sum\_{v\leq m/du, w\leq m/du} \frac1{vw} \\
&=\sum\_{u\leq m}\sum\_{d\leq m/u} \frac{\mu(u)}{du^2} \left( \log^2(m/du) + O(\log m)\right)\\
&=\sum\_{u\leq m}\sum\_{d\leq m/u}\frac{\mu(u)}{du^2}\left(\log^2m-2\log m\log du+\log^2 du\right)\\
&=\frac1{\zeta(2)}\log^3 m-\frac1{\zeta(2)}\log^3m + \frac1{3\zeta(2)}\log^3m + O(\log^2m)\\
&=\frac1{3\zeta(2)}\log^3m+O(\log^2m)\\
&=\frac2{\pi^2}\log^3m + O(\log^2m).
\end{align}
$$
Hence,
$$
S\_2(x,m)=\frac{2x}{\pi^2}\log^3m + O(x\log^2m)+O(m^2).
$$


We might be able to obtain $S\_a(x,m)$ by the same method. But, resulting sums are more complicated.


