TITLE: Ring with $\frac{n+1}{2}$ squares
QUESTION [5 upvotes]: Let $R$ be a ring with $n=|R|\geq3$ elements, which has $\frac{n+1}{2}$ squares. Prove that $1+1$ is invertible and $R$ is a field.

I thought that if there are $\frac{n+1}{2}$ squares, then $n+1$ is even, which means $n$ is odd. Let $k$ be the order of $1$. Obviously, $k|n$, hence $k$ is odd, which implies $(2,n)=1$, resulting that $1+1\neq0,$ i.e. $1+1$ is invertible.
We see that for any $x\in R$, $x\neq-x$, but I got stuck here.

REPLY [3 votes]: I am assuming the interpretation that the number of squares is exactly $(n+1)/2$.
As the OP observed, this implies that $n$ must be odd, and hence the additive order $k$ of $1$ is also an odd integer.

It follows that $k\cdot x=0$ for all the elements of $R$. If
$x\neq0$, this implies that $x\neq -x$ for otherwise the order of
$x$ is a factor of both $k$ and $2$, which is absurd.
As $x^2=(-x)^2$ for all $x\neq0$, the $n-1$ non-zero elements of $R$
can have at most $(n-1)/2$ distinct squares. Adding $0^2=0$ to the tally, we can have at most $(n+1)/2$ distinct squares. This means that we must have the following implication:

If $x^2=y^2$ in the ring $R$, then either $x=y$ or $x=-y$.

It follows that $R$ can have no zero divisors. This is a bit tricky. Assume contrariwise that $uv=0$ for some elements $u,v\in R\setminus\{0\}$. Then


We also have $vu=0$. For if $vu\neq0$, then we have
$$0^2=0=v0u=vuvu=(vu)^2$$ in violation of the highlighted implication.
But if $vu=uv=0$, then we have
$$(u-v)^2=u^2-uv-vu+v^2=u^2+v^2$$ as well as
$$(u+v)^2=u^2+uv+vu+v^2=u^2+v^2.$$ The highlighted implication then tells us that $u-v=\pm(u+v)$ implying that either $u=0$ or $v=0$. This is a contradiction.

In a ring without zero divisors the cancellation law, $ca=cb\implies a=b$ holds whenever $c\neq0$. Similarly the cancellation law, $ac=bc\implies a=b$ also holds.
Let $r\in R, r\neq0$, be arbitrary. By item 4 the elements $ra$, $a$ ranging over $R$, are all distinct. As $R$ is finite, $1$ is among them, and we can conclude that $r$ has a right inverse. Similarly we see that $r$ has a left inverse. Associativity of the product then implies in the usual way that the left and right inverses must coincide. Therefore $r$ is invertible.
So $R$ is a division ring. By a theorem of Wedderburn every finite division ring is a field, and we are done.