I think this should just be computations. Define as usual $e(x) = \exp(2 pi i x)$. Define $$ f(r,s,N,a,b) = \sum_{w=1}^{rsa} e\left(\frac{N}{4 rs} w^2 + \left(\frac{1}{2s}+\frac{b}{2} \right) w\right) $$ Then $F(a,r,s,N,a,b) = \frac{1}{2i } (f(r,s,N,a,b) - f(r,s,N,a, -b))$, at least if I didn't make any computational mistakes. Now, start with $a = 1$. Then you can use, the method described in http://en.wikipedia.org/wiki/Quadratic_Gauss_sum#Generalized_quadratic_Gauss_sums . Next, one has to understand what happens if one passes from $a$ to $a + 1$. For this compute $$ f(r,s,N,a+1,b) - f(r,s,N,a,b) $$ I guess, the result should be of the form $z f(\hat r,\hat s, \hat N, 1, \hat b)$ with $|z| = 1$. <b>Note:</b> I began summing at $1$ on purpose, so one sums over the group $\mathbb{Z}_{rsa}$, which seems like the correct choice ...