I want to write a function, $f(k,a,b)$, I made, in terms of combinations of the fractional part function, $$ j\left\{\frac{c \ }{d}k\right\},$$ where $c,d,$ and $j$ are any integers.
The function is as follows: $f(k,a,b)=1$ if $k\equiv b$ mod a
and $f(k,a,b)=0$, if it is not
I need a general method for finding the expansion of this function in terms of the fractional part function for any given coprime integers $a,b$.
An example of one is $$ f(k,6,1)= -\{k/6 \}+\{k/2\}+\{2k/3\} $$ Such that if, $k\equiv 1$ mod 6 , then $f(k,6,1)=1$, if not $f(k,6,1)=0$.
So I need a general method for finding the expansion of $f(k,a,b)$ in terms of the fractional part operator.