Not too too long - after I realized that is was possible to simplify it as such, Tungsten A helped me with the actual condensation.
(Also, since all periodic functions are analytical, they are all presumably inversable with the langrange inversion theorem. Which is cool.)
Also I notice that the series yields something of the shape (-(kx) mod p) + c rather than ((kx) mod p) + c,which is what I would have expected. Is the sawtooth wave defined as always downward sloping, or did you overlook something?
Also also I'm sorry to hear that she died for your performance, but you know what they say.
The show MUST go on!