Fix an interval $[a,b] \subset [0,1]$ and let $S$ be a given sequence of real numbers. Are there any ad-hoc methods that may be used to estimate $$ T := \#\{ s \in S \ : \ \{s\} \in [a,b]\}? $$ Here $\{s\} := s - \lfloor s \rfloor$ denotes the fractional part of $s$. I have some ideas but I'm not sure these will be useful. Perhaps some of you have seen these things before?
For example suppose that $S = (f(n))_{n \in [1,N] \cap \mathbb{Z}}$ for some smooth function $f : \mathbb{R} \to \mathbb{R}$ (you may think of an easy example for $f$; I'm interested in a general methodology here) and some positive integer $N$. Now $$ T = \sum_{n=1}^N 1_{[a,b]}(\{f(n)\}). $$ A possible direction here (but I don't know if this strategy could work) could be to introduce a smooth bump or cuttoff function $\phi$ supported on $[a,b]$ and approximate $T$ by $$ T_\phi = \sum_{n=1}^N \phi(\{f(n)\}). $$ Since $f,\phi$ are smooth and the function $\{x\}$ is differentiable on $\mathbb{R}\setminus \mathbb{Z}$, then, assuming $f(x) \in \mathbb{Z}$ for only finitely many $x \in [1,N]$, (I think) one could use the Euler-Maclaurin formula to express $T_\phi$ as an integral on $[1,N]$. Then hopefully use what is known about integrals involving the fractional-part function (see here for instance http://www.springer.com/cda/content/document/cda_downloaddocument/9781461467618-c1.pdf?SGWID=0-0-45-1446028-p174908973) to get an estimate. Do you think this approach might work? Have you seen these types of things before? It would be interesting if you know some examples. For instance what cutt-off functions could be useful here? Thanks!
The most common approach is to use Fourier analysis.
Start with your sum $$T_\phi = \sum_{n=1}^N \phi(\{f(n)\}).$$ We may replace $\phi$ by a $1$-periodic function on $\mathbb{R}/\mathbb{Z}$, since the fractional parts function is $1$-periodic. Thus, we wish to estimate $$T_\phi = \sum_{n=1}^N \phi(f(n)).$$ Since $\phi$ is periodic and smooth, it has a Fourier series whose coefficients have nice decay properties. The zero frequency will give the main term, and the nonzero frequencies should contribute to the error term.
Showing the the contribution of the nonzero frequencies is small requires showing the relevant exponential sums are small (i.e. exhibit cancellation). The sums to estimate look like $$\sum_{n=1}^N e^{2\pi i h f(n)},$$ for some $h \neq 0$.
Let's give a sketch of how this works for a specific example. Let $[a,b] \subset [0,1]$ be a fixed interval, and suppose we wish to study $$F := \sum_{n = 1}^N \textbf{1}(a \leq \{\sqrt{n}\} \leq b).$$ We let $\phi$ be a smooth function supported on $[a,b]$ which is equal to $1$ on $[a+\epsilon,b - \epsilon]$, and extend $\phi$ by periodicity. Therefore $\phi$ has a Fourier series $$\phi(x) = \sum_{h \in \mathbb{Z}} c_h e(hx),$$ where $e(y) = e^{2\pi i y}$ and $$c_h = \int_0^1 \phi(t) e(-ht)dt.$$ Integration by parts shows $$|c_h| \ll_j (1+|h|)^{-j}$$ for all $j \geq 0$.
We now return to studying $F$. We have $$F \geq \sum_{n=1}^N \phi(\sqrt{n}),$$ and expanding $\phi$ in its Fourier series yields $$F \geq \widehat{\phi}(0) N + \sum_{h \neq 0} c_h \sum_{n=1}^N e(h \sqrt{n}).$$ We can study the exponential sum $$\sum_{n=1}^N e(h \sqrt{n}), \ \ \ \ \ \ h \neq 0,$$ by Euler-Maclaurin summation. Indeed, we have $$\sum_{n=1}^N e(h \sqrt{n}) = \int_1^N e(h\sqrt{t})dt + 2\pi i h \int_1^N \frac{\{t\}e(h\sqrt{t})}{\sqrt{t}}dt + O(1),$$ which implies $$\sum_{n=1}^N e(h \sqrt{n}) \ll \frac{N^{1/2}}{|h|} + |h| N^{1/2}.$$ Upon summing over $h$ we obtain $$F \geq \widehat{\phi}(0) N + O(N^{1/2}) \geq (b-a-2\epsilon) N + O(N^{1/2}).$$
We may handle an upper bound for $F$ in an entirely similar fashion. Letting $\epsilon \rightarrow 0$ slowly, we get $$F = \sum_{n = 1}^N \textbf{1}(a \leq \{\sqrt{n}\} \leq b) \sim (b-a)N$$ as $N \rightarrow \infty$.