Q:

Maximum value of multiplicative order

Let $x \in \mathbb{Z}_{n^2}^*$ and let us assume that the multiplicative order of $x$ is multiple of $n$, then what is the maximum value of multiplicative order possible for $x$ under modulo $n^2$ ?
Is it $n \lambda$ , where $\lambda$ is Carmichael function of $n$ .How ?
Is it possible to have multiplicative order of $x$ greater than $n \lambda$ ?

A:

$\lambda(m)$ is the exponent of $\mathbb{Z}_{m}^*$, that is, the lcm of the orders of all elements.
In particular, no element can have order greater than $\lambda(m)$.
Now, $\lambda(n^2)\le n\lambda(n) \ (\star)$. So, it is not possible to have elements of order greater than $n\lambda(n)$, because there are no elements of order greater than $\lambda(n^2)$. In particular, if an element has order $nk$, then $k\le \lambda(n)$.

$(\star)$
  Take $x$ with $(x,n^2)=1$. Then $(x,n)=1$ and $x^{\lambda(n)}\equiv 1 \bmod n$. Write $x^{\lambda(n)}=1+an$. Then $x^{n\lambda(n)}=(1+an)^n=1+\binom{n}1an+ \binom{n}2 (an)^2+\cdots+(an)^n \equiv1 \bmod n^2$. Thus, $n\lambda(n) \ge \lambda(n^2)$, because $\lambda(n^2)$ is the least exponent for $\mathbb{Z}_{n^2}^*$.

