I'm working in $\mathbb{Z}_n$ under multiplication (not addition) for some time now and I'm beginning to notice something:
For $n \in \mathbb{N}$ where $n$ is even and $\frac{n}{2}$ is odd, it seems to be always true that $\frac{n}{2}$ is idempotent, i.e. $(\frac{n}{2})^2 \equiv \frac{n}{2}$ mod $n$ when $n$ satisfies the aforementioned definition.
So I wanna try to prove this but I don't know how to approach it. My first thought was induction since this iterates across $n \in \mathbb{N}$ satisfying my definition of $n$.
Proof
Let $n \in \mathbb{N}$ such that $n$ is even and $\frac{n}{2} = 2k+1$ for some other $k \in \mathbb{N} \cup \{0\}$ (Note that $k$ could equal $0)$
Define $P(n)$ as the statement:$(\frac{n}{2})^2 \equiv \frac{n}{2}$ mod $n$
Our basis case would be $P(2): (\frac{2}{2})^2=(1)^2 \equiv 1$ mod $2 \equiv \frac{2}{2}$ mod $2$ So $P(2)$ holds as true.
Assume $P(i)$ is true for some $i \in \mathbb{N}$ where $i = 2(2k+1)$.
Inductively, then we have:
$$P(i+1): (\frac{i+1}{2})^2 = ?? $$
Then I get stuck here and don't know how to proceed. Obviously, I can't do much once I put $k$'s into the equation because $k$ can be any number. All we know about $k$ is that $k \leq n$ by how we defined $n$.