Polynomials that induce the zero function mod $n$ 
*

*Which polynomials induce the zero function mod $n$?


In particular:


*

*What is the polynomial of least degree that induces the zero function mod $n$?

*What is the monic polynomial of least degree that induces the zero function mod $n$?
These are not vacuous questions because of the following general result:

If $r$ is the maximum exponent in the prime factorization of $n$, then $x \mapsto x^{r+\lambda (n)}-x^r$ is the zero function mod $n$. [Wikipedia]

Here, $\lambda$ is the Carmichael function.


*

*When is $x^{r+\lambda (n)}-x^r$ the monic polynomial of least degree that induces the zero function mod $n$?


Fermat's theorem implies that $x^n-x$ is the answer for $n$ prime: all polynomials that induce the zero function mod $n$ are a multiple of $x^n-x$.
How can this be generalized to composite $n$?
Here are some other examples:
$$
\begin{array}{rll}
n & L_n: \text{least degree} & M_n: \text{least degree monic}
\\ 2 & x^2+x
\\ 3 & x^3-x
\\ 4 & 2(x^2+x) & x^4-x^2
\\ 5 & x^5-x
\\ 6 & 3(x^2+x) & x^3-x
\\ 7 & x^7-x
\\ 8 & 4(x^2+x) & x^4+2x^3+3x^2+2x = x(x+1)(x^2+x+2)
\\ 9 & 3(x^3-x) & x^8-x \quad (???)
\\ 10 & 5(x^2+x) & x^5-x
\\ 11 & x^{11}-x
\\ 12 & 6(x^2+x) & x^4+5x^2+6x = x(x+1)(x^2-x+6)
\\ 13 & x^{13}-x
\\ 14 & 7(x^2+x) & ???
\\ 15 & 5(x^3-x) & x^5-x
\\ 21 & 7(x^3-x) & ???
\\ 24 & 12(x^2+x) & x^4+2x^3+11x^2+10x = x(x+1)(x^2+x+10)
\end{array}
$$
It seems clear that $L_{2m}=m(x^2+x)$, because $x^2+x$ is always even.
More generally,


*

*Is $L_{pq} = qL_p$ and $M_{pq}=L_q$ for $p<q$ primes?

*If $n=pm$ and $p$ is smallest prime divisor of $n$, then is $L_{pm}=mL_p$?
Corrections and additions welcome.
Please collect partial results as answers.

These papers characterize the polynomials that induce the zero function mod $n$:

*

*On polynomial functions (mod $n$) by Singmaster (1974)


*Polynomials and their residue systems by Kempner (1921)
Kempner's paper is closer to what I have in mind. I'll have to check it more closely.
I came across Kempner's paper in the paper A basis for residual polynomials in $n$ variables by Litzinger (1935).
