TITLE: Difficult Infinite Sum
QUESTION [5 upvotes]: Does anyone know of a way to simplify this sum?
$$S(n)=\sum_{j=1}^{\rho(n)}\sum_{k=1}^\infty\frac{\sin[2\pi k n 2^{-j}]-\sin[2\pi k (n-1) 2^{-j}]}{k}$$
where $\rho(n)=[\log_2(n)]$ (and $[x]$ denotes the greatest integer less than $x$).
Note: This question is a follow-up to a previous question I asked:
Greatest power of two dividing an integer
EDIT: After following all the given suggestions, I found that for integer $n$,
$$\frac{S(n)}{\pi}=2^{-\rho(n)}-1+\frac{1}{1+(-1)^n}\sum_{j=1}^{\rho(n)}\left[\frac{n}{2^j}\right]-\left[\frac{n-1}{2^j}\right].$$
This is pretty much what I started with in my previous post, so if anyone knows of a way to take this sum, please let me know. Anyway, I will leave this result here in case anyone ever comes across $S(n)$ in some other context. Thanks to everyone who helped.

REPLY [10 votes]: The summand is even in k, and $\sin(x)/x$ has a nice Fourier transform, so it is very tempting to symmetrise in k (and throw in k=0, adopting the usual convention that the sinc function $\sin(x)/x$ equals 1 at x=0) and then apply Poisson summation.  This should lead to a nice expression for the inner sum that can then be summed in j.  (Admittedly there is the issue that the sinc function is not absolutely integrable, but one can still proceed formally for the purposes of getting the right answer, and then go back and make things more rigorous, e.g. by using the theory of distributions, if this becomes necessary.  I'm guessing that there is some cancellation between the two terms in the summand that will assist in this task.)
The logarithmic expressions of the form $\log(1 - e^{ix})$ that appeared in the other comments are not as scary as they seem.  Observe that the final sum is real, so one only needs the real parts of things like $i\log(1 - e^{ix})$, i.e. the phase of $\log(1-e^{ix})$, but this is basically something like $x/2 \pm \pi/2$ (depending on branch cuts).  So there is probably going to be quite a bit of simplification.  (But going via the Poisson summation route rather than the logarithmic power series route may be a bit more direct, even if both methods ought to give the same answer at the end.)