Is modulus a periodic function?

3k Views Asked by At

Is taking a mod of something, like 12 mod 2 (which is 0), a periodic function? If not, what kind of function is it and can it be classified as such?

3

There are 3 best solutions below

0
On

The function :

$$f_k : n \mapsto f_k(n)$$

which gives the remainder of the Euclidean division of n by k is periodic of period k.

$$f_k(n+k) \equiv f_k(n) \pmod k$$

0
On

If you mean the function $mod_n : \mathbb Z \to \mathbb Z_n : x \mapsto x \mod n$ then yes, I woudl say it is periodic, because every value $mod_n(x)$ can be received by shifting $x$ into $\{0,\ldots,n-1\}$.

0
On

We have $f(x)=x\mod n$, $$f(x+kn)=(x+kn)\mod n = x\mod n=f(x)$$

Since this holds for any $k\in\Bbb Z$, $f(x)$ is periodic with period $n$