# Is $\lim\limits_{m\to\infty}\frac{1}{m}\sum_{n=1}^m \cos\left(\frac{2\pi nj}{s}\right)$ "useful"?

In this answer it is explained that a big reason that the nth prime formula discussed with (13) and (14) isn't "useful" is because $$\lfloor\frac{x}{b}\rfloor-\lfloor\frac{x-1}{b}\rfloor$$ doesn't have "nice analytical properties". This special floor function is $$1$$ when $$x$$ divides $$b$$ and $$0$$ otherwise. I'm curious, does $$f(x)=\lim\limits_{m\to\infty}\frac{1}{m}\sum_{n=1}^m \cos\left(\frac{2\pi nx}{b}\right)$$ have good analytical properties? In other words, is it "useful"? It essentially performs the same function as the one referenced.

EDIT (Feb 12):

I've found that there is another equivalent expression we can write where, as @user1952009 noted there is for the above expression, there is no inversion of limits in this expression. Observe $$f(x)=\lim\limits_{m\to\infty}\frac{1}{2^m}\sum_{n=1}^{2^m} \cos\left(\frac{2\pi nx}{b}\right)=\lim\limits_{m\to\infty}\cos\left(\frac{\pi x}{b}(1+2^m)\right)\prod_{n=1}^m \cos\left(\frac{\pi x}{b}(2^{n-1})\right)$$ and $$m$$ is an integer.

• are j, s arbitrary integers? couldn't you just replace j/s by a rational number r?
– MCT
Jan 15, 2016 at 4:02
• approximation of non continuous functions by a converging sequence of $C^\infty$ functions is very useful, and your formula is directly related to the Fourier series $\lfloor x \rfloor = 1/2 - \sum_{n=1}^\infty \frac{\sin(2 \pi n x)}{\pi n}$ (just take its derivative and $x=j/s$) which is the formula used to prove the functional equation for $\zeta(s)$. so yes it has nice analytical properties in some cases, when inversion of limits is allowed. Jan 15, 2016 at 8:15

Weyl's criterion states that a sequence $a_{k}$ is equidistributed modulo 1, meaning its fractional part is uniformly distributed in the region [0,1], if for all non-zero integers $p$ this holds
$$\lim\limits_{m \to \infty} \frac{1}{m} \sum\limits_{k=1}^{m} e^{2\pi i p a_{k}} = 0$$
Your equation is the real part of this expression for the sequence $\frac{x}{b},\frac{2x}{b},\frac{3x}{b},\cdots,\frac{nx}{b},...$ and $p=1$.