\documentclass[10pt]{studiamnew}
\usepackage{amsmath,amsthm,amsfonts}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{placeins}
\frenchspacing
\sloppy

\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{case}[theorem]{Case}
\newtheorem{condition}[theorem]{Condition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{criterion}[theorem]{Criterion}
\newtheorem{definition}[theorem]{Definition}

\theoremstyle{definition}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{algorithm}[theorem]{Algorithm}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{solution}[theorem]{Solution}
\newtheorem{notation}[theorem]{Notation}

\renewcommand{\theequation}{\thesection.\arabic{equation}}
\numberwithin{equation}{section}

\newcommand{\eqdefa}{\overset{comm.}{=}}
\newcommand{\eqdefb}{\overset{Mouf.}{=}}
\newcommand{\eqdefc}{\overset{altern.}{=}}
\newcommand{\eqdefd}{\overset{flex.}{=}}

\begin{document}
%
\setcounter{page}{1}
\setcounter{firstpage}{1}
\setcounter{lastpage}{4}
\renewcommand{\currentvolume}{??}
\renewcommand{\currentyear}{??}
\renewcommand{\currentissue}{??}
%
\title{Idempotent and Nilpotent Elements in Octonion Rings over  ${\mathbb Z}_{\mathbf{p}}$}
\author{Michael Aristidou}
\address{``Texas A\&M University at Galveston"
Galveston, TX\\
USA}
\email{maristidou@tamu.edu}
%
\author{Philip R. Brown}
\address{``Texas A\&M University at Galveston"
Galveston, TX\\
USA}
\email{brownp@tamug.edu}
%
\author{George Chailos}
\address{``University of Nicosia",
Nicosia\\
Cyprus}
\email{chailos.g@unic.ac.cy}
%
\subjclass{15A33, 15A30, 20H25, 15A03}
\keywords{quaternion, octonion, ring, skew field, idempotent, nilpotent}
\begin{abstract}
\noindent In this paper, we show that the set $\mathbb{O}\slash\mathbb{Z}_{p}$, where $p$ is a prime
number, does not form a skew field and discuss idempotent and nilpotent elements in the (finite) ring $\mathbb{O}\slash\mathbb{Z}_{p}$. We provide examples and establish conditions for idempotency and nilpotency. 
\end{abstract}

\maketitle

\section{Introduction}
Quaternions, denoted by $\mathbb{H}$, were first discovered by William. R. Hamilton in 1843 as an extension of complex numbers into four dimensions \cite{Remmert}. Namely, a quaternion is of the form  $ x=a_0+a_1 i+a_2 j+a_3 k$, where $a_i$ are reals and $i , j, k$ are such that $i^2 = j^2 = k^2 = ijk = -1$. Algebraically speaking, $\mathbb{H}$ forms a division algebra (skew field) over 
$\mathbb{R}$ of dimension 4 (\cite{Remmert}, p.195-196).About the same time, John T. Graves discovered the octonions, denoted by  $\mathbb{O}$, which are 8-dimensional numbers of the form $ x=a_0+a_1 e_1+a_2 e_2+a_3 e_3+a_4e_4+a_5e_5+a_6e_6+a_7e_7$ where $a_i$ are reals and $e_i$'s are mutually anti-commuting roots of unity. (i.e. $e_i^2 = -1$ and $e_ie_j=e_k$, $e_je_i = -e_k$, $i \neq j$) \cite{Baez}. Algebraically speaking,  $\mathbb{O}$ forms a normed division algebra (skew field) over $\mathbb{R}$ of
dimension 8 \cite{Baez}. It is the largest of the (only) four$^1$ normed division algebras and it is nonassociative.

A study of the structure and some of its properties of the finite ring$^2$ $\mathbb{H}\slash\mathbb{Z}_{p}$, where $p$ is a prime
number, was done in \cite{Aristidou09}. A more detailed description of the structure $\mathbb{H}\slash\mathbb{Z}_{p}$ was given by
Miguel and Serodio in \cite{Miguel}. Among others, they found the number of zero-divisors, the number of
idempotent elements, and provided an interesting description of the zero-divisor graph. In particularly, they showed that the number of idempotent elements in $\mathbb{H}\slash\mathbb{Z}_{p}$ is $p^2 +p +2$, for $p$ odd prime.  As discussed in \cite{Aristidou12}, the only scalar idempotents in $\mathbb{H}\slash\mathbb{Z}_{p}$ are $a_0 =0$, $1$. Furthermore, there are no purely imaginary idempotents in $\mathbb{H}\slash\mathbb{Z}_{p}$. On the other hand, in \cite{Aristidou13}, it was shown that nilpotents $x$ in  $\mathbb{H}\slash\mathbb{Z}_{p}$  are purely imaginary with norm $N(x) = 0$ and $x^2 = 0$.

In the sections that follow, we look at the structure of the finite ring $\mathbb{O}\slash\mathbb{Z}_{p}$. The multiplication of
octonions followed the Fano Plane and it was programmed in Maple$^3$. We give examples of
idempotent and nilpotent elements in $\mathbb{O}\slash\mathbb{Z}_{p}$ and provide conditions for idempotency and nilpotency in $\mathbb{O}\slash\mathbb{Z}_{p}$.

\vspace*{-14.4mm}

\section{Is $\mathbb{O}\slash\mathbb{Z}_{p}$ a finite skew field? A counterexample}
In \cite{Aristidou09} we saw that since ${\mathbb Z}_{\mathbf{p}}$ is a field, then $\mathbb{H}\slash\mathbb{Z}_{p}$ is a quaternion algebra. The theory of quaternion algebras over a field $\mathbb{K}$ (char$\mathbb{K}\ne2$) tells us that a quaternion algebra $Q$ is either a division ring or $Q = \mathbb{M}_{2 \times 2}(\mathbb{K})$ ([16], p.16, 19).  Since $\mathbb{H}\slash\mathbb{Z}_{p}$ is not a division ring (see \cite{Aristidou09}), then $\mathbb{H}\slash\mathbb{Z}_{p}\cong  \mathbb{M}_{2 \times 2}(\mathbb{Z}_{p})$
if $p\ne2$.

The real matrix representation of $\mathbb{H}\slash\mathbb{Z}_{p}$,  where $x=a_0+a_1 i+a_2 j+a_3 k$  $\in$ $\mathbb{H}\slash\mathbb{Z}_{p}$, is achieved by the $4\times 4$  left or right Hamilton Operators as follows:
\[  H_x^L =
\begin{bmatrix}
    a_0  & -a_1 & -a_2 & -a_3      \\
    a_1  & a_0 & -a_3 & a_2         \\
    a_2  & a_3 & a_0 & -a_1         \\
    a_3  & -a_2 & -a_1 & -a_0
\end{bmatrix}
\,\,H_x^R =
\begin{bmatrix}
    a_0  & -a_1 & -a_2 & -a_3      \\
    a_1  & a_0 & a_3 & -a_2         \\
    a_2  & -a_3 & a_0 & a_1         \\
    a_3  & a_2 & -a_1 & a_0
\end{bmatrix}
\]
But is the finite ring  $\mathbb{O}\slash\mathbb{Z}_{p}$ a skew field? Consider the elements $x_1 =2e_2-e_3, x_2 = e_4+3e_5$ in
 $\mathbb{O}\slash\mathbb{Z}_{5}$. Multiplying the two, we get:
\\
\\
          \hspace*{25mm}$x_1\cdot x_2 = (2e_2-e_3)(e_4+3e_5) = 0 (mod\,5)$
\\
\\
This shows that $\mathbb{O}\slash\mathbb{Z}_{5}$ has zero-divisors, and hence  $\mathbb{O}\slash\mathbb{Z}_{5}$ is not a skew field. This was also
anticipated by some well-known theorem in algebra, by Wedderburn in 1905 ([11], p.361),
which says that: ``Every finite skew field is a field". Since $\mathbb{O}\slash\mathbb{Z}_{p}$
is not commutative, then it is not a field, and so it is not a skew-field.

So, what is the structure of  $\mathbb{O}\slash\mathbb{Z}_{p}$? Since $\mathbb{Z}_{p}$ is a field, then  $\mathbb{O}\slash\mathbb{Z}_{p}$ is a non-associative octonion algebra.
As a matter of fact, is it an alternative, flexible and power associative algebra$^4$.
It is well known that ${\mathbb O}$ is a skew field, yet it has no ‘proper’ matrix representation due to the non-associativity.
Nevertheless, as ${\mathbb O}$ is an extension of  ${\mathbb H}$, by the Cayley-Dickson process, some non-proper $8 \times 8$ real matrix representations were introduced, by Tian in \cite{Tian}, through the left and right Hamilton Operators of quaternions analogous to the one above. Namely:
\vspace*{5mm}
\[  H_x^L =
\begin{bmatrix}
    a_0  & -a_1 & -a_2 & -a_3 &-a_4  & -a_5 & -a_6 & -a_7   \\
    a_1  & a_0 & -a_3 & a_2 & -a_5  & a_4 & a_7&-a_6    \\
    a_2  & a_3 & a_0 & -a_1 &-a_6  & -a_7 & a_4 & a_5   \\
    a_3  & -a_2 &  a_1 & a_0 &-a_7  & a_6 & -a_5 & a_4 \\
   a_4  & a_5 &  a_6 & a_7 &a_0  & -a_1 & -a_2 & -a_3 \\
   a_5  & -a_4 &  a_7 & -a_6 & a_1  & a_0 & a_3 & a_2 \\
    a_6  & -a_7 &  -a_4 & a_5 &a_2  & -a_3 & a_0 & a_1 \\
   a_7& a_6 &  -a_5 & -a_4 &a_3  & a_2 & -a_1 & a_0 \\
\end{bmatrix}
\]

\[H_x^R =
\begin{bmatrix}
    a_0  & -a_1 & -a_2 & -a_3 &-a_4  & -a_5 & -a_6 & -a_7   \\
    a_1  & a_0 & a_3 & -a_2 & a_5  & -a_4 & -a_7 & a_6    \\
    a_2  & -a_3 & a_0 & a_1 &a_6  & a_7 & -a_4 & -a_5   \\
    a_3  & a_2 &  -a_1 & a_0 &a_7  & -a_6 & a_5 & -a_4 \\
   a_4  & -a_5 &  -a_6 & -a_7 & a_0  & a_1 & a_2 & a_3 \\
   a_5  & a_4 &  -a_7 & a_6 & -a_1  & a_0 & -a_3 & a_2 \\
    a_6  & a_7 &  a_4 & -a_5 &-a_2  & a_3 & a_0 & -a_1 \\
   a_7& -a_6 &  a_5 & a_4 &-a_3  & -a_2 & a_1 & a_0 \\
\end{bmatrix}
\]
Modifying the above over  ${\mathbb Z}_{p}$, one could easily get the left and right $8 \times 8$ real representations of
$\mathbb{O}\slash\mathbb{Z}_{p}$ as follows$^5$:
\[  H_x^L =
\begin{bmatrix}
    a_0  & p-a_1 & p-a_2 & p-a_3 &p-a_4  &p-a_5 & p-a_6 &p-a_7   \\
    a_1  & a_0 & p-a_3 & a_2 & p-a_5  & a_4 & a_7&p-a_6    \\
    a_2  & a_3 & a_0 & p-a_1 &p-a_6  & p-a_7 & a_4 & a_5   \\
    a_3  & p-a_2 &  a_1 & a_0 &p-a_7  & a_6 & p-a_5 & a_4 \\
   a_4  & a_5 &  a_6 & a_7 &a_0  & p-a_1 & p-a_2 & p-a_3 \\
   a_5  & p-a_4 &  a_7 & -a_6 & a_1  & a_0 & a_3 & a_2 \\
    a_6  & p-a_7 &  p-a_4 & a_5 &a_2  & p-a_3 & a_0 & a_1 \\
   a_7& a_6 &  p-a_5 & -a_4 &a_3  & a_2 & p-a_1 & a_0 \\
\end{bmatrix}
\]

\[H_x^R =
\begin{bmatrix}
    a_0  & p-a_1 & p-a_2 & p-a_3 &p-a_4  & p-a_5 & p-a_6 & p-a_7   \\
    a_1  & a_0 & a_3 & p-a_2 & a_5  & p-a_4 & p-a_7 & a_6    \\
    a_2  & p-a_3 & a_0 & a_1 &a_6  & a_7 &p-a_4 & p-a_5   \\
    a_3  & a_2 &  p-a_1 & a_0 &a_7  &p-a_6 & a_5 & p-a_4 \\
   a_4  & p-a_5 &  p-a_6 & p-a_7 & a_0  & a_1 & a_2 & a_3 \\
   a_5  & a_4 &  p-a_7 & a_6 & p-a_1  & a_0 & p-a_3 & a_2 \\
    a_6  & a_7 &  a_4 & p-a_5 &p-a_2  & a_3 & a_0 & p-a_1 \\
   a_7& p-a_6 &  a_5 & a_4 &p-a_3  &p-a_2 & a_1 & a_0 \\
\end{bmatrix}
\]
Notice that for the octonionic cases  ${\mathbb O}$ and $\mathbb{O}\slash\mathbb{Z}_{p}$, we have that $H_{xy}^L \ne H_x^LH_y^L$ because of the non-associativity.



\section{Idempotent and Nilpotents Elements in $\mathbb{O}\slash\mathbb{Z}_{p}$}

Recall that an element $x$ in a ring $R$ is called idempotent if $x^2 = x$. In the ring $\mathbb{H}\slash\mathbb{Z}_{p}$, $p$ prime, in the special case where $x = a_0, a_0 \ne 0$ (i.e., $x$ is a non-zero scalar in $\mathbb{H}\slash\mathbb{Z}_{p}$) one quickly observes that if $x$ is idempotent then $x = 1$, for $x$ in { 1, 2, ..., $p$-1}, since $(x, p) = 1$. Therefore, the
only scalar idempotent in $\mathbb{H}\slash\mathbb{Z}_{p}$ is 1 (we omit the case $x = 0$ as trivial). Another simple case
is the case where $x = ai, aj$ or  $ak, a \ne 0$ (i.e., a non-zero scalar multiple of the imaginary
units). Then, $x^2 = (ai)^2 = -a^2 i^2 = -a^2 \ne ai =x$,  which shows that there are no idempotents of the
form $ai, aj$ or $ak$. (Again, we omitted the case $x = 0$ as trivial). Examples of proper idempotents$^6$ and conditions for idempotency in $\mathbb{H}\slash\mathbb{Z}_{p}$ were given in \cite{Aristidou12}. Due to the isomorphism $\mathbb{H}\slash\mathbb{Z}_{p}$  $\cong$ $\mathbb{O}[e_i, e_j, e_ie_j]$ (where $e_i \neq e_j$) idempotents in $\mathbb{H}\slash\mathbb{Z}_{p}$ will transfer in some subalgebras$^7$ of $\mathbb{O}\slash\mathbb{Z}_{p}$. For example, $x = 4+i + 3j + 4k$ is idempotent in $\mathbb{H}\slash\mathbb{Z}_{7}$  and therefore $x = 4+e_1 + 3e_2 + 4e_3$ is idempotent in $\mathbb{O}\slash\mathbb{Z}_{7}$ . Nevertheless, $x = 4+e_1 + 3e_3 + 4e_5$ is a non-``quaternionic" idempotent in $\mathbb{O}\slash\mathbb{Z}_{7}$. Notice that  $x = 7i+4j$ is nilpotent in $\mathbb{H}\slash\mathbb{Z}_{13}$  and so $x = 7e_1+4e_2$ is also nilpotent in $\mathbb{O}\slash\mathbb{Z}_{13}$ . Nevertheless, $x=4e_1 + e_2 + 3e_3 + 4e_5$ is a non-``quaternionic" nilpotent in $\mathbb{O}\slash\mathbb{Z}_{7}$. As we will show below, purely imaginary octonions in $\mathbb{O}\slash\mathbb{Z}_{p}$  cannot be idempotents, just as in $\mathbb{H}\slash\mathbb{Z}_{p}$ \cite{Aristidou12}. And nilpotents in $\mathbb{O}\slash\mathbb{Z}_{p}$ are purely imaginary, just as in $\mathbb{H}\slash\mathbb{Z}_{p}$   \cite{Aristidou13}.



\begin{theorem}
Let $x$ $\in$ $\mathbb{O}\slash\mathbb{Z}_{p}$ be an octonion of the form $x = a_0 + \sum_{i=1}^7 a_ie_i $. Then $x$ is idempotent if
and only if $a_0 = \frac{1+p}{2}$ and $ \sum_{i=1}^7 a_i^2 = \frac{p^2 -1}{4}$.
\end{theorem}

\begin{proof}
We follow the steps given in the proof for the quaternion case in \cite{Aristidou12}. Since $x$ is idempotent,
we have:
\begin{align*}
  x^2 = x &\Rightarrow (a_0 + \sum_{i=1}^7 a_ie_i)(a_0 + \sum_{i=1}^7
            a_ie_i) =  a_0 + \sum_{i=1}^7 a_ie_i \\
  &\Rightarrow a_0^2 + 2a_0\sum_{i=1}^7 a_ie_i + (\sum_{i=1}^7
    a_ie_i)(\sum_{i=1}^7 a_ie_i) = a_0 + \sum_{i=1}^7 a_ie_i \\
&  \xRightarrow[\text{Fano}]{\text{distr.}} \, a_0^2 - \sum_{i=1}^7 a_i^2 = a_0 \quad \textrm{and} \quad 2a_0a_i = a_i
\end{align*}
From the 2$^{nd}$ equation, we have that either $a_i = 0$ or $2a_0 = 1$. That is $a_0 = \frac{1+p}{2}$, as $p =0(mod\,p)$. Substituting the latter in the 1$^{st}$ equation, we get $\sum_{i=1}^7 a_i^2 = \frac{p^2 -1}{4}$.
\end{proof}

\begin{corollary}
 Let $x$ $\in$ $\mathbb{O}\slash\mathbb{Z}_{p}$ be a purely imaginary octonion of the form $x = \sum_{i=1}^7 a_ie_i$. Then $x$ is not
idempotent.
\end{corollary}

\begin{proof}
If $x$  is purely imaginary then $a_0 =0$. Then from Theorem $3.1$, $0 = \frac{1+p}{4}$ which is a
contradiction.
\end{proof}

\begin{example}
Consider $x =4+e_1 + 3e_3 +4e_5$ in $\mathbb{O}\slash\mathbb{Z}_{7}$. Then $x$ is idempotent. Notice that $4 = \frac{1+7}{2}$ and $1^2+3^2+4^2 =26= \frac{49-1}{4}\, mod(7)$.
\end{example}

\begin{remark}
To find the number of idempotents in $\mathbb{O}\slash\mathbb{Z}_{p}$, one could naturally find how many ways $\frac{P^2 -1}{4}$ can be written as a sum of seven or fewer squares. The equation $\sum_{i=1}^7 a_i^2 = \frac{p^2 -1}{4}$  in Theorem $3.1$ brings to mind the ‘sum of seven squares problem’, which is to
find the different values $r_7(n)$ for which $n = \sum_{i=1}^7 x_i^2$, $n$ $\in$ $\mathbb{N}$. A formula for square-free values
of $n$ were stated without proof by Eisenstein in 1847, and those were extended to all positive integers $n$ by Smith in 1864, also without a proof. Hardy in 1920 developed a method in deriving the proof for $r_k(n)$, where $k$ is odd, but he explicitly showed only the $r_5(n)$  case in \cite{Hardy20,Hardy18}. More
general results for r$_7(n)$ were given by Cooper in 2001 \cite{Cooper2} and Cooper and Hirschhorn in 2007 \cite{Cooper7}.
\end{remark}
Recall that an element $x$ in a ring  $R$ is called nilpotent if $x^k =0$ for some $k \in \mathbb{N}$. In \cite{Aristidou13},  it was shown that if $x$ in $\mathbb{H}\slash\mathbb{Z}_{p}$ is nilpotent then the norm $N(x) =0$ (where  $N(x) =xx^*=\sum_{i=0}^3 a_i^2$) and, furthermore, that $x$ is purely imaginary and $x^2 =0$. If $x$ $\in$ $\mathbb{O}\slash\mathbb{Z}_{p}$, we have similar results. First, consider the following Lemmas:

\begin{lemma}
For any $x$ $\in$ $\mathbb{O}\slash\mathbb{Z}_{p}$, we have that $x^2 - 2a_0x+N(x) =0$.
\end{lemma}
\begin{proof}
Let $x = a_0 + \sum_{i=1}^7 a_ie_i$. Then the left-hand side of the equation becomes:

\begin{align*}
x^2 - &2a_0x + N(x) =(a_0 + \sum_{i=1}^7 a_ie_i)(a_0 +
\sum_{i=1}^7 a_ie_i) -2a_0x + N(x) \\
&= a_0^2 + 2a_0\sum_{i=1}^7 a_ie_i+(\sum_{i=1}^7 a_ie_i)(\sum_{i=1}^7
    a_ie_i) - 2a_0(a_0+ \sum_{i=1}^7 a_ie_i) + \sum_{i=0}^7 a_i^2 \\
 & = a_0^2 + \sum_{i=1}^7 2a_0a_ie_i  - \sum_{i=1}^7 a_i^2  - 2a_0(a_0 +
     \sum_{i=1}^7 a_ie_i) + \sum_{i=0}^7 a_i^2 \\
  &= a_0^2 + 2a_0\sum_{i=1}^7 a_ie_i - \sum_{i=1}^7 a_i^2 - 2a_0^2 -
     2a_0 \sum_{i=1}^7 a_ie_i + a_0^2 +  \sum_{i=1}^7 a_i^2 \\
 & =0
\end{align*}
\end{proof}

\begin{lemma}
Let $x$ $\in$ $\mathbb{O}\slash\mathbb{Z}_{p}$. If $x$ is nilpotent, then $N(x) =0$.
\end{lemma}

\begin{proof}
We follow the steps given in the proof for the quaternion case in \cite{Aristidou13}. If $x$ is nilpotent, then
$x^k = 0$ for some $k$. From Lemma $3.5$ above, we have:

\begin{align*}
  x^2 - 2a_0x + N(x) =0 &\Rightarrow x(x -2a_0) = -
  N(x) \\
  &\Rightarrow (x(x - 2a_0))^k =  (- N(x))^k \\
  &\Rightarrow x^k(x - 2a_0)^k =  (- N(x))^k \mbox{ (see Remark $3.7$ below)} \\
  &\Rightarrow 0 =  (N(x))^k \\
  &\Rightarrow N(x) = 0 , \mbox{ because } {\mathbb Z}_{\mathbf{p}} \mbox{ is a field.}
\end{align*}

\end{proof}

\begin{remark}
We discuss the statement $(x(x - 2a_0))^k  = x^k(x - 2a_0)^k$ in the proof in the Lemma $3.6$ above: The statement is taken as obvious, without a proof, in \cite{Aristidou13}  (in Lemma 2.1) for the quaternionic case  $\mathbb{H}\slash\mathbb{Z}_{p}$, but it deserves a bit more explanation in our case here considering the non-commutativity and non-associativity of  $\mathbb{O}\slash\mathbb{Z}_{p}$. As we mentioned in Sec.2, $\mathbb{O}\slash\mathbb{Z}_{p}$
is an alternative algebra (and flexible). Therefore, it also satisfies the \textit{Moufang Identities}, in particularly the identity $(xy)(zx) = (x(yz))x$. Given this, it is not hard to show the following:

\begin{proposition}
  If $A$ is an alternative algebra such that $xy = yx$, $x$, $y$ $\in$ $A$, then $(xy)^k = x^ky^k$.
\end{proposition}

\begin{proof}
  We show this for $k = 2$ (the general case follows by iteration). Indeed:%\\

\begin{equation*}
\begin{split}
  (xy)^2 = (xy)(xy) \eqdefa (yx)(xy) &\eqdefb (y(xx))y \\
  &\eqdefc ((yx)x)y \\
  &\eqdefa ((xy)x)y \\
  &\eqdefd (x(yx))y\\
  &\eqdefa (x(xy))y\\
  &\eqdefc((xx)y)y\\
  &\eqdefb (xx)(yy)
  \end{split}
\end{equation*}
\end{proof}
\noindent Hence, the statement $(x(x -2a_0))^k = x^k(x - 2a_0)^k$ is also true in our particular case here, because
$\mathbb{O}\slash\mathbb{Z}_{p}$ is alternative (and flexible) and $x(x-2a_0) = (x-2a_0)x$. It is also clear now why the statement
is easy to prove in $\mathbb{H}\slash\mathbb{Z}_{p}$, considering that
$\mathbb{H}\slash\mathbb{Z}_{p}$ is actually associative. Finally,
given the above result, one could also obtain the binomial formula $(x+y)^k = \sum_{j=0}^k \begin{pmatrix} k \\ j
\end{pmatrix} x^jy^{k-j}$, which could also be
used to prove the statement in question. That is:
\begin{align*}
(x(x-2a_0))^k = (x^2-2a_0x)^k &= \sum_{j=0}^k \begin{pmatrix} k \\
  j \end{pmatrix} (x^2)^j(-2a_0x)^{k-j} \\
  &= x^k \sum_{j=0}^k \begin{pmatrix} k \\ j
  \end{pmatrix} x^j(-2a_0)^{k-j} \\
  &= x^k(x-2a_0)^k
\end{align*}
\end{remark}


\begin{theorem}
Let $x$ $\in$ $\mathbb{O}\slash\mathbb{Z}_{p}$. Then $x$ is nilpotent if and only if $x$ is purely imaginary and $N(x) =0$. Furthermore, if $x$ is nilpotent, then $x^2 = 0$.
\end{theorem}

\begin{proof}
If $x$ is nilpotent, then $x^k =0$ for some $k >1$ (where $k$ is the least such natural number). From Lemma $3.6$ above, we have that  $N(x) =0$. Combining Lemmas $3.5$ and $3.6$, we get $x^2
 = 2a_0x$. Following the steps given in the proof for the quaternion case in \cite{Aristidou13}, we have:

\begin{align*}
 \textrm{If\ } k\ \textrm{is even}:\quad x^2 = 2a_0x & \Rightarrow (x^2)^{k/2} = (2a_0)^{k/2}x^{k/2}\\
  &\Rightarrow x^k = (2a_0)^{k/2}x^{k/2}\\
  &\Rightarrow 0= (2a_0)^{k/2}x^{k/2}\\
  &\Rightarrow a_0 = 0\, 
\end{align*}
\begin{align*}
 \hspace*{1.3cm}\textrm{If\ } k\ \textrm{is odd}:\quad x^2 = 2a_0x &\Rightarrow (x^2)^{(k+1)/2} = (2a_0)^{(k+1)/2}x^{(k+1)/2} \\
  &\Rightarrow (x)^{(k+1)/2} = (2a_0)^{(k+1)/2}x^{(k+1)/2} \\
  &\Rightarrow 0 =(2a_0)^{(k+1)/2}x^{k/2}  \\
 & \Rightarrow a_0 =0
\end{align*}
Hence, $a_0 = 0$ and therefore $x$ is imaginary. Furthermore, since $a_0 = 0$, from $x^2 = 2a_0x$ we have that  $x^2 = 0$. For the converse, since $N(x) =0$, Lemma $3.5$ gives $x^2 =2a_0x$. Since also $x$ is imaginary $(a_0 = 0)$ the equation $x^2 = 2a_0x$ gives $x^2
 = 0$. Then for any $k >1$ we have:  $x^k = x^{k-2}x^2 = x^{k-2}\cdot 0 = 0$, so $x$ is nilpotent.
\end{proof}

\begin{example}
 Consider $x = 4e_1 + e_2 + 3e_3 +4e_5$ in $\mathbb{O}\slash\mathbb{Z}_{7}$. Then $x$ is nilpotent. Notice that
$N(x) =0^2+4^2+1^2+3^2+ 0^2+4^2+0^2 +0^2= 0(mod\,7)$.
\end{example}


\section{Connection to General Rings and Applications}

There is a lot in the literature on idempotents, nilpotents and k-potents in general, in more general
rings $R$. It would be interesting to see if and how some of these results relate to the `special', in a
sense, ring $\mathbb{O}\slash\mathbb{Z}_{p}$.


In \cite{Hirano}, Hirano and Tominaga proved that in a ring $R$ the following are equivalent: (i) Every element of R is a sum of two commuting idempotents; (ii) R is commutative and every element of R is a sum of two idempotents; (iii) $x^3 =x$, for all $x$ in $R$.$^8$ As $\mathbb{O}\slash\mathbb{Z}_{p}$  is not commutative, the above fails. For example, consider the idempotents $a=3+e_1$ and $b = 3+e_2$ in $\mathbb{O}\slash\mathbb{Z}_{5}$. Then, $x=a+b=(3+e_1)+(3+e_2)=6+e_1+e_2=1+e_1+e_2$, but $x$ is not tripotent (indeed, $(1+e_1+e_2)^3 = e_1+e_2 \neq 1+e_1+e_2)$. The above fails even when the idempotents commute. Take, for example, $a = b = 3 + e_1$ in $\mathbb{O}\slash\mathbb{Z}_{5}$.

Also, Mosic in \cite{Mosic} gives the relation between idempotent and tripotent elements in any
associative ring $R$, generalizing the result on matrices by Trenkler and Baksalary \cite{Trenkler}. Namely, for
any $x$ $\in$ $R$, where 2, 3 are invertible, $x$ is idempotent if and only if $x$ is tripotent and $1-x$ is tripotent
or $1+x$ is invertible. Notice that even though $\mathbb{O}\slash\mathbb{Z}_{p}$ is not associative, the result does hold in some
cases. Take for example the tripotent $x = 4 +3e_1 + e_2+ 4e_3$ in $\mathbb{O}\slash\mathbb{Z}_{7}$, which is also an idempotent. It is not hard to check that directly or using the conditions for idempotency in Theorem $3.1$ above. Notice also that $1 - x$ is tripotent and $1 + x$ is invertible as $N(x) =2\neq 0$. So, we conjecture that Mosic’s result may extend to (some) non-associative rings.

Finally, it is interesting to note any possible applications of rings related to the ring $\mathbb{O}\slash\mathbb{Z}_{p}$. Malekian and Zakerolhosseini in \cite{Malekian} use octonionic algebras to construct a high speed public key
cryptosystem. More specifically, they consider the convolution polynomial rings $R = \mathbb{Z}[x]/(x^N -1)$, $R_{p} =\mathbb{Z}_{p}[x]/(x^N-1)$ and $R_{q} = \mathbb{Z}_{q}[x]/(x^N -1)$, where $p$, $q$ are primes such as  $q \gg p$.
From these
they construct the octonionic algebras:

\begin{align*}
  \mathbb{A} &= \{\,a_0(x)+ \sum_{i=1}^7 a_i(x)e_i\ |\ a_i(x) \in R\,\}\, ,  \\
 \mathbb{A}_{p} &= \{\,a_0(x) + \sum_{i=1}^7a_i(x)e_i\ |\ a_i(x)\
                  \in R_{p}\,\}\, , \\
  \mathbb{A}_{q} &=  \{\,a_0(x)+ \sum_{i=1}^7 a_i(x)e_i\ |\ a_i(x) \in
                   R_{q}\,\}\, ,
\end{align*}
respectively. Then, the public (and private) key is generated as follows: initially two small octonions $F\in\mathbb{L}_{f}$ and $G\in\mathbb{L}_{g}$, where $\mathbb{L}_{f}, \mathbb{L}_{g}$ are
some specifically constructed subspaces of $\mathbb{A}$, are randomly
generated. Namely,

\begin{align*}
  F &= f_0 + \sum_{i=1}^7f_ie_i\ |\ f_i\in
  \mathbb{L}_{f}\, , \\
  G &= g_0 + \sum_{i=1}^7g_ie_i\ |\ g_i\in \mathbb{L}_{g}\, .
  \end{align*}
The octonion $F$ must be invertible in  $\mathbb{A}_{p}$ and  $\mathbb{A}_{q}$ , otherwise a new octionion $F$ is generated. The inverses of $F$ in $\mathbb{A}_{p}$ and $\mathbb{A}_{q}$ are denoted by in $F_p^{-1}$ and $F_q^{-1}$, respectively. The public key, which is an octonion, is then given by $H = F_p^{-1} o\,G \in \mathbb{A}_{q}$ , where $o$ is a multiplication defined on $\mathbb{A}_{q}$, in terms of the convolution product. Encryption and decryption are done with similar calculations.


\section*{\noindent Notes}
1. $\mathbb{R}$, $\mathbb{C}$, $\mathbb{H}$ and $\mathbb{O}$ are the only normed division algebras. This was proved by Hurwitz in 1898 \cite{Hurwitz}. \\
\\
2. ``+" and ``." on $\mathbb{H}$ are defined in {\cite[p. 124]{Herstein}. As $p=0 (mod\,p)$ on $\mathbb{H}\slash\mathbb{Z}_{p}$ they are defined as follows:\\

 \hspace*{2cm}$x+y = (a_0 + a_1i + a_2j+a_3k) + (b_0 + b_1i + b_2j+b_3k) $\\
   \hspace*{3.6cm}  $= (a_0 +b_0) +(a_1+b_1)i + (a_2+b_2)j + (a_3+b_3)k$\\
\hspace*{2.7cm} $ x\cdot y \hspace*{0.15cm}=  (a_0 + a_1i + a_2j+a_3k)\cdot(b_0 + b_1i + b_2j+b_3k) $\\
\hspace*{3.6cm}$ =a_0b_0 + (p-1)a_1b_1 + (p-1)a_2b_2 + (p-1) a_3b_3 + \\
     \hspace*{3.8cm} (a_0b_0 + a_1b_0 + a_2b_3 + (p-1)a_3b_2)j + \\
     \hspace*{3.8cm}  (a_0b_2 + (p-1)a_1b_3 + a_2b_0 + a_3b_1)j+\\
\hspace*{3.8cm}(a_0b_3 + a_1b_2 + (p-1)a_2b_1 +a_3b_0)k$\\
\\
3. Fano Plane (Figure~\ref{fig:fano}); Multiplication table (Figure~\ref{fig:octmult}); Program in Maple (Figure~\ref{fig:maple}):
\begin{figure}[h]\centering
  \includegraphics[scale=0.5]{fanoplane.jpg}
  \caption{Fano Plane}
  \label{fig:fano}
\end{figure}
\begin{figure}[h]\centering
  \includegraphics[scale=0.26]{octonion-multiplication-table.jpg}
  \caption{Multiplication table}
  \label{fig:octmult}
\end{figure}
\begin{figure}[h]\centering
  \includegraphics[scale=0.22]{mapleextract.jpg}
  \caption{Maple program}
  \label{fig:maple}
\end{figure}
\FloatBarrier
%
\noindent 4. Accordingly, the following hold: $(xx)y = x(xy)$ (alternative), $x(yx) = (xy)x$ (flexible), $\left<x\right>$  is power
associative for all $x$. \\
\\
5. These representations are given in \cite{Halici}  without a proof. The proof for $\mathbb{O}\slash\mathbb{Z}_{p}$ is actually straightforward,
following the exact steps in the proofs of Theorems 2.1 and 2.3 in \cite{Tian} for the case of  $\mathbb{O}$. \\
\\
6. In Herstein \cite[p. 130]{Herstein}, we have as an exercise that: In a ring $R$, if $x^2 =x$, for all $x$ in $R$, then $R$ is commutative. It is not hard to show that the converse is not true. (e.g. $\mathbb{F} = \mathbb{Z}_{3}$, 2 is not idempotent). Actually, a field $\mathbb{F}$ has only trivial idempotents. Hence, in $\mathbb{H}\slash\mathbb{Z}_{p}$ some elements are non-trivial idempotents and they were described in \cite{Aristidou12}. \\
\\
7. Namely, the seven quaternionic subalgebras of $\mathbb{O}$ each generated by the seven “lines” (including the circle)
in the Fano Plane.\\
\\
8. A ring  $R$ is called a \emph{tripotent ring} if $x^3 =x$, for all $x$ in $R$. The fact that a tripotent ring is commutative is found as an exercise in Hernstein \cite[p. 136]{Herstein}. Several proofs of this fact have been given since the 60's \cite{Ayoub}. In Bourbaki, we find it also as an exercise with guided steps/hints for the proof \cite[p. 176]{Bourbaki}. See also \cite{Poorten}. Interestingly, a more general result by Jacobson was already known in the 40's \cite{Jacobson}. Namely, if in a ring $R$ there exists an integer $n> 1$  such that $x^n$=$x$, for every $x$ in $R$, then $R$ is commutative. For a proof of Jacobson's Theorem see \cite{Ayoub}, \cite{Hernstein2}.
\\
\begin{thebibliography}{9}
\bibitem{Ankeny} N. C. Ankeny, Sum of Three Squares, \textit{Proc. Amer. Math. Soc.}, {\bf 8} (2) (1957), 316--319.
\bibitem{Aristidou09} M. Aristidou and A. Demetre, A Note on Quaternion Rings over $\mathbb{Z}_{p}$, \textit{Int. J. Alg.}, {\bf 3} (15) (2009), 725-728.
\bibitem{Aristidou12} M. Aristidou and A. Demetre, Idempotent Elements in Quaternion Rings over $\mathbb{Z}_{p}$, \textit{Int. J.  Alg.}, {\bf 6} (5) (2012), 249-254.
\bibitem{Aristidou13}M. Aristidou and A. Demetre, Nilpotent Elements in Quaternion Rings over $\mathbb{Z}_{p}$, \textit{Int. J.  Alg.},  {\bf 6} (14) (2012), 663 - 666.
\bibitem{Ayoub} R. Ayoub and C. Ayoub, On the Commutativity of Rings, \textit{Am. Math. Mon.}, {\bf 71} (3) (1964), 267-271.
\bibitem{Baez} J.C. Baez, The Octonions, \textit{Bull. Amer. Math. Soc.}, {\bf39} (2002), 145-205.
\bibitem{Bourbaki} N. Bourbaki, \textit{Elements of Mathematics - Algebra I}, Hermann, 1974.
\bibitem{Cooper2} S. Cooper, Sums of Five, Seven and Nine Squares, \textit{Ramanujan J.}, {\bf6} (2002), 469–490.
\bibitem{Cooper7} S. Cooper and M. Hirschhorn, On the Number of Primitive Representations of Integers as Sums of Squares, \textit{Ramanujan J.}, {\bf13} (2007), 7–25.
\bibitem{Halici} S. Halici and A. Karatas,  $\mathbb{O}\slash\mathbb{Z}_{p}$ Octonion Algebra and its Matrix Representations, \textit{Palest. J. Math.}, {\bf6} (1) (2017), 307-313.
\bibitem{Hardy18}  G.H. Hardy, On the Representations of a Number as the Sum of any Number of Squares,  and in particular of Five or Seven, \textit{Proc. Nat. Acad. Sci.}, U.S.A. {\bf4} (1918), 189–193.
\bibitem{Hardy20} G.H. Hardy, On the Representation of a Number as the Sum of any Number of Squares,  and in particular of Five, \textit{Trans. Amer. Math. Soc.}, {\bf21} (1920), 255–284.
\bibitem{Herstein} I. N. Herstein, \textit{Topics in Algebra}, 2nd ed., Wiley, 1975.
\bibitem{Hernstein2} I. N. Herstein, Wedderburn's Theorem and a Theorem of Jacobson,  \textit{Am. Math. Mon.}, {\bf 68} (3) (1961), 249-251.
\bibitem{Hirano} Y. Hirano and H. Tominaga, Rings in which every element is the sum of two idempotents.  \textit{Bull.
Austral. Math. Soc.} {\bf 37} (2) (1988), 161–164.
\bibitem{Hurwitz} A. Hurwitz, Über die Composition der Quadratischen Formen von Beliebig Vielen Variabeln, \textit{Nachr. Ges. Wiss. Göttingen} (1898) 309-316.
\bibitem{Jacobson} N. Jacobson, Structure Theory for Algebraic Algebras of Bounded Degree, \textit{Ann. of Math.},
 {\bf 46} (1945), 695-707.
\bibitem{Miguel} C. J. Miguel and R. Serodio, On the Structure of Quaternion Rings over $\mathbb{Z}_{p}$, \textit{Int. J.  Alg.}, {\bf 5} (27) (2011), 1313-1325.
\bibitem{Malekian} E. Malekian and A. Zakerolhosseini, OTRU: A non-Associative and High Speed Public Key Cryptosystem, \textit{15th CSI International Symposium on Computer Architecture and Digital Systems, Iran}, 2010, 83-90.
\bibitem{Mosic} D. Mosic, Characterizations of $k$-potent Elements in Rings, \textit{Ann. Mat. Pura Appl.}, {\bf194} (4)
 (2015), 1157-1168.
\bibitem{Pierce}  R. S. Pierce, \textit{Associative Algebras}, Springer, 1982.
\bibitem{Poorten} Alf van der Poorten, Concerning Commuting, \textit{Austral. Math. Soc. Gazette}, {\bf194} (1994), 68.
\bibitem{Remmert} H. D. Ebbinghaus, H. Hermes, F. Hirzebruch, M. Koecher, K. Mainzer, J. Neukirch, A.Prestel, R.Remmert, \textit{Numbers}, Springer, NY, 1991.
\bibitem{Schafer} R. Schafer, \textit{An Introduction to Nonassociative Algebras}, Academic Press, 1996.
\bibitem{Serre}  J. P. Serre, \textit{A Course in Arithmetic}, Springer, 1973.
\bibitem{Tian}Y. Tian, Matrix representations of Octonions and their Applications, \textit{Adv. Appl. Clifford  Algebr.}, {\bf10} (1) (2000), 61-90.
\bibitem{Trenkler} G. Trenkler and O.M. Baksalary, On k-potent Matrices, \textit{Electron. J. Linear Algebra}, {\bf26}
 (2013), 446-470.

\end{thebibliography}

\end{document} 