Can all functions over $\mathbb{Z}/4\mathbb{Z}$ be "described" by a polynomial?

Any polynomial function will have the property that $x \equiv y \pmod 2 \implies f(x) \equiv f(y) \pmod 2$.
On the other hand it is easy to give an example of a function that doesn't have it.


Another way to look at it is by just counting. We have that $n^4 = n^2$ for any $n$, so any polynomial function may be represented by a polynomial of degree $3$ or less. There are $4^4$ polynomials of degree three or less, and there are $4^4$ functions in $T$. However, there is some overlap between the polynomials, since for instance the polynomial expressions $$ 2n + 2n^2\\ 2n + 2n^3\\ 0 $$ represent the same function. Therefore there must be some functions that cannot be polynomials.


Let $R$ be a commutative ring with $1$. If every function from $R$ to $R$ is a polynomial then every non-zero $r\in R$ is invertible.

To wit, a function $f$ with $f(0)= 0$ and $f(r)=1$. Suppose it is polynomial. Then the polynomial has no constant coefficient, because $f(0)=0$. Yet, then $f(r)= rg(r)$ for some $g(r) \in R$, and also $f(r)=1$, so $r$ is invertible.

Indeed, this leads to every function from $R$ to $R$ is a polynomial if and only of $R$ is a finite field.