Consider $f: (a,a+p] \rightarrow \mathbb{R}$.
What is the "formula" for the p-periodic function $g$ which has the property that $g(x + np) = f(x)$ for all $x$ in $(a, a+p]$? I am well aware of how it looks like graphically, but in what formal notation is this function written, as a piecewise function?
Given $x \in \mathbb{R}$, there exists a unique $y \in (a,a+p]$ such that $x = y + np$ for some $n$. We usually write $y = x - a \pmod p$. It is as though $y$ were the remainder of the "division of $x-a$ by $p$", with the exception that $p$ need not be an integer.
In this notation, the function $g$ becomes simply $g(x) = f(x-a \pmod p)$.