Artificial intelligent assistant

Show that for $p \neq 2$ not every element in $\mathbb{Z}/p\mathbb{Z}$ is a square. Show that for $p\neq2$, not every element in $\mathbb{Z}/p\mathbb{Z}$ is a square of an element in $\mathbb{Z}/p\mathbb{Z}$. (Hint: $1^2=(p-1)^2=1$. Deduce the desired conclusion by counting). So far I have that $1=p^2-2p-1\Rightarrow p^2-2p=0\Rightarrow p^2=2p$, but I don't know where to go from here. I also don't fully understand what it means to deduce it by _counting_.

You're going off in the wrong direction. Since $1^2=(p-1)^2$, the function $f(x)=x^2$ is not a subjection. Therefore its image is a strict subset of $Z/pZ$, since it's a finite set.

Put another way, there are $p$ numbers, but two of them have the same square, so we can go count the squares and find there are less than $p$.

Extending this argument a bit tells you that in fact half of the numbers are squares.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 598e3419ee81fba43d89d7130ee0d58c