umm ok
I didn't need an expression to do this. Instead, I just
* keyframed the tx and ty curves for the first 40 frames.
* Opened the graph editor
* Picked the ty curve and selected all of its keys by dragging
* chose Curves > Post Infinity > Cycle
* Picked the tx curve and selected its keys
* chose Curves > Post Infinity > Cycle with Offset
No expressions at all, and as far as I can tell it does exactly what you want.
-- Mark