Prove that $\sum_{n=1}^{\infty} \frac{[nx]}{n^2} $ is discontinuous at $x \in \mathbb Q$ We define $[x] := x - \lfloor x \rfloor$ to be the fractional part of $x\in\mathbb{R}$, and set $$f(x)= \sum_{n=1}^{\infty} \frac{[nx]}{n^2} $$ for $x\in\mathbb{R}$, and I wish to prove that it is discontinuous at $x\in\mathbb{Q}$. I can prove that it is continuous at all irrational points using uniform convergence, but I don't know how to prove discontinuity in this case.
I looked at this similar question, but I'm not satisfied that the answer is rigorous – at least, I don't understand the step the author makes, and it seems like that step may assume a statement that is not correct. Thanks.
 A: I am proving this result for positive rationals; proof for negative rationals will be similar. For convenience, I am using $(a)$ to denote the fractional part of $a$. Let $\frac{p}{q}$ be a rational. Let $r=\frac{p}{q}$. Now we write the function as $$f(r)=\sum_{n=1}^{\infty}\frac{(nr)}{n^2}=\sum_{n:\ q\mid n}\frac{(nr)}{n^2}+\sum_{n:\ q\nmid n}\frac{(nr)}{n^2}=f_1(r)+f_2(r)$$. In the 2nd part of the above sum, $(nr)$ is never $0$, hence $\sum_{n:\ q\nmid n}\frac{(nr)}{n^2}$ is continuous at $r$ by uniform convergence. So, it is enough to prove that the 1st part of the above sum is not continuous at $r$. We write the 1st sum as follows: $$\sum_{n:\ q\mid n}\frac{(nr)}{n^2}=\sum_{k=1}^{\infty}\frac{(kqr)}{k^2q^2}$$. Now, fix sum $k\in\mathbb{N}$. Let $r_k=r-\frac{1}{kq}=\frac{p}{q}-\frac{1}{kq}$. (For negative rational $r$, define $r_k=r+1/kq$) Then $\frac{(qr_k)}{q^2}=\frac{(p-\frac{1}{k})}{q^2}=(1-\frac{1}{k})/q^2$. Now, $f_1(r)=0$. If $f$ is continuous at $r$, $\lim_{x\to r}=f_2(r)$, $\lim_{x\to r}f_1(r)=0$. Now, notice that $r_k\to r$ as $k\to\infty$. But, $f_1(r_k)\ge\frac{(qr_k)}{q^2}=(1-1/k)/q^2>1/2q^2$ for large values of $k$. Hence $f_1(r_k)\not\to 0\Longrightarrow f$ is not continuous at $x=r$.
