Spectral conditions for spherical two-distance sets

Abstract: A set of points $S$ in $d$-dimensional Euclidean space $\mathbb{R}^d$ is called a 2-distance set if the set of pairwise distances between the points has cardinality two. The 2-distance set is called spherical if its points lie on the unit sphere in $\mathbb{R}^{d}$. We characterize the spherical 2-distance sets using the spectrum of the adjacency matrix of an associated graph and the spectrum of the projection of the adjacency matrix onto the orthogonal complement of the all-ones vector. We also determine the lowest dimensional space in which a given spherical 2-distance set could be represented using the graph spectrum.

\section{Introduction}
The problem of sets with few distances is considered to be naturally emerging in discrete geometry and coding theory.
The simplest case is the one of \emph{2-distance sets}, i.e. sets of points in $n$-dimensional space with only two possible distances between its elements.

The study of 2-distance sets began in 1947 when Kelly \cite{kelly1947elementary} showed that a 2-distance set in the plane can have at most 5 points. In 1963, Croft \cite{croft19639} showed that a 2-distance set in $\mathbb{R}^3$ can have at most 6 points. Larman, Rogers, and Seidel \cite{larman1977two} found an upper bound on the size of a 2-distance set in $\mathbb{R}^d$ that is asymptotically tight, essentially resolving this question.

The other extreme case, the ``minimal'' 2-distance sets, has also been extensively studied.
There are infinitely many non-isomorphic 2-distance sets with $d+1$ points or fewer, so the smallest interesting case is $d+2$ points.
In 1966, Einhorn and Schoenberg \cite{einhorn1966euclidean} showed that there is a finite number of 2-distance sets in $\mathbb{R}^d$ with $d+2$ points and gave a combinatorial interpretation for the number of such ``small" sets (see \cref{main}).

Motivated by \cref{main}, we are interested in characterizing the 2-distance sets whose points lie on the unit sphere. We call those sets \emph{spherical}. A previous characterization of the spherical 2-distance sets was completed in 2012 by Nozaki and Shinohara \cite{nozaki2012geometrical}, who gave a necessary and sufficient condition for a graph to correspond to a spherical 2-distance set in some Euclidean space (see Definition~\ref{sphericalrep}) based on Roy's previous results \cite{roy2010minimal}. The conditions in \cite[Theorem~2.4]{nozaki2012geometrical} involve bulky expressions that use the eigenvalues of the adjacency matrix and the angles of its eigenvectors with the all-ones vector.
In contrast, here we focus on the ``small" spherical graphs (with exactly $d+2$ vertices in $\mathbb{R}^d$) and obtain a much cleaner necessary and sufficient condition for a graph to have a spherical representation in this case, only using the eigenvalues of the adjacency matrix and the eigenvalues of its projection onto a subspace.
\begin{theorem}\label{mainres}
    Let $d$ a be positive integer, and let $G$ be a graph on $d+2$ vertices whose adjacency matrix $A_G$ has eigenvalues $\lambda_1 \geq \lambda_2 \geq \dots \geq \lambda_{d+2}$. Let $J$ be the all-ones matrix and $P = I - \frac{1}{d+2}J$ be the projection matrix onto the subspace orthogonal to the all-ones vector. Then $G$ has a spherical representation in $\mathbb{R}^d$ if and only if the maximum eigenvalue of $PA_GP$ is equal to $\lambda_2$ and the multiplicity of the eigenvalue $\lambda_2$ is equal in $A_G$ (excluding $\lambda_1$ if $\lambda_1 = \lambda_2$) and $PA_GP$.
\end{theorem}

In fact, the lowest dimensional space in which a given spherically representable graph $G$ is also determined by the multiplicity of the second eigenvalue of $G$.

\begin{prop}\label{lowestdimensionspherical}
    Let $n \leq d$ be a positive integer. If a graph $G$ on $d+2$ vertices is spherically representable in $\mathbb{R}^d$, then it is (spherically) representable in $\mathbb{R}^n$ if and only if the multiplicity of $\lambda_2$ in its adjacency matrix $A_G$ (excluding $\lambda_1$ if $\lambda_1 = \lambda_2$) is at least $d+1-n$.
\end{prop}

The paper is organized as follows. In Section~\ref{preliminaries}, we define (spherical) 2-distance sets and (spherically) representable graphs, and recall two results from the literature that we use in the paper. In Section~\ref{conditions}, we give four initial conditions for a graph on $d+2$ vertices to be representable as a spherical 2-distance set in $\mathbb{R}^d$. In Section~\ref{secondeigen}, we rephrase the four conditions from Section~\ref{conditions} in terms of another matrix, and find a formula for the matrix that depends on the second eigenvalue of the adjacency matrix of the graph. In Section~\ref{reduction}, we further reduce the positive-semidefinite conditions, which we use to prove Theorem~\ref{mainres} and Proposition~\ref{lowestdimensionspherical} in Section~\ref{finsec}. In Section~\ref{compres}, we use Proposition~\ref{lowestdimensionspherical} to enumerate small spherical graphs by size and lowest representable dimension.

\section{Preliminaries}\label{preliminaries}
First, we formally define a 2-distance set and some related concepts.
\begin{definition}
A set of points $S$ in $\mathbb{R}^d$ is a \emph{2-distance set} if
\begin{equation*}
    |D| = 2, \text{ where } D = \{ ||p_i - p_j|| \text{ for } p_i, p_j(\neq p_i) \in S\}.
\end{equation*}
Let $D = \{\alpha_1, \alpha_2\}$ such that $\alpha_1 > \alpha_2$. Denote by $k=\alpha_1 / \alpha_2 > 1$ the \emph{distance ratio} of $S$. Two 2-distance sets are \emph{equivalent} if one can obtain one from the other via isometries and scaling.
\end{definition}

The structure of a 2-distance set can be naturally encoded with a graph.

\begin{definition}
For a 2-distance set $S$, we define its \emph{associated graph} $G = G(S)$ to be a graph whose vertices correspond  points in $S$, and two vertices are adjacent if and only if the distance between their corresponding points in $S$ is $\alpha_1$ (i.e. the longer distance of the two).
\end{definition}

We are also interested in the opposite direction, i.e. when a graph has an associated 2-distance set.

\begin{definition}
A graph $G$ is \emph{representable in $\mathbb{R}^d$ with ratio $k>1$} if there exists a 2-distance set $S$ in $\mathbb{R}^d$ with distance ratio $k>1$ such that $G = G(S)$ is the associated graph of $S$.
\end{definition}

There are infinitely many non-equivalent 2-distance sets on at most $d+1$ points. For instance, we can generate infinitely many 2-distance sets by taking a regular simplex on $d$ points in a hyperplane of dimension $d-1$ and an arbitrary point on the line through the center of the simplex that is perpendicular to the $(d-1)$-dimensional hyperplane of the simplex.

The following theorem gives a necessary and sufficient condition for a graph of size $d+2$ to be representable in $\mathbb{R}^d$, thus proving that there are finitely many 2-distance sets with $d+2$ points. It is a direct implication from the proof of Theorem 1 in \cite{einhorn1966euclidean}.

\begin{theorem}[Einhorn--Schoenberg \cite{einhorn1966euclidean}]\label{main}
    Let $G$ be a graph on $d+2$ vertices. If $G$ is a complete multipartite graph, then $G$ is not representable in $\mathbb{R}^d$ for any value of $k>1$. If $G$ is not a complete multipartite graph, then there exists a unique value $k>1$ for which $G$ is representable in $\mathbb{R}^d$ with ratio $k$.
\end{theorem}
\cref{main} allows us to work with the graph of the 2-distance set, which is a much simpler structure than the 2-distance set. We also cite the following lemma which was used to prove Theorem~\ref{main}. It gives us a necessary and sufficient condition for the existence of points with a fixed set of distances between them in a Euclidean space of dimension $d$.

\begin{lemma}[Schoenberg \cite{schoenberg1935remarks}] \label{ns}
Let $\{m_{ij}\}_{i,j = 1}^n$ be nonnegative real numbers such that $m_{ij} = m_{ji}$ for all $i,j$ and $m_{ii} = 0$ for $i = 1,2\dots n$. There exist points $p_1, \dots, p_n \in \mathbb{R}^d$ with $||p_i - p_j|| = m_{ij}$ for all $i, j$ if and only if the $(n-1) \times (n-1)$ matrix $B'$ with
$$b_{ij}' = m_{1i}^2 + m_{1j}^2 - m_{ij}^2$$
is positive semidefinite (which we denote by $B' \succeq 0$) and $\rank(B') \leq d$. Moreover, this configuration is unique up to congruence.
\end{lemma}
Now we give a definition for a spherical 2-distance set, the main focus of this paper. A similar definition is used in the literature (\cite{musin2009spherical}, \cite{musin2019graphs}).

\begin{definition}\label{sphericalrep}
A 2-distance set $S$ in $\mathbb{R}^d$ is called \emph{spherical} if all of its points lie on an $(d-1)$-dimensional sphere in $\mathbb{R}^d$. A graph $G$ is \emph{spherical} or has a \emph{spherical representation} in $\mathbb{R}^d$ if there exists a spherical 2-distance set $S\subset \mathbb{R}^d$ whose associated graph is $G$.
\end{definition}

Finally, we denote by $A_G$ the adjacency matrix of a graph $G(V,E)$ and its eigenvalues by $\lambda_1 \geq \lambda_2 \geq \dots \geq \lambda_{|V|}$. For the remainder of the paper, $\lambda_i$ will always refer to the $i$-th eigenvalue of $A_G$.

\section{Conditions for spherical 2-distance sets}\label{conditions}

In this section we give a set of four necessary and sufficient conditions for a graph to have a spherical representation. First, we define the matrix $B_G$ which encodes the pairwise distances of the corresponding 2-distance set.
\begin{definition}
Given a \emph{representable} graph $G(V, E)$ on $d+2$ vertices with ratio $k$, denote by $B_G = B_G(k)$ the $(d+2)\times(d+2)$ matrix with entries
    $$b_{ij} =
    \begin{cases}
        0 \text{, if } i = j\\
        -1 \text{, if } \{ i,j\} \not \in E\\
        -k^2 \text{, if } \{ i,j\} \in E.
    \end{cases}
$$
\end{definition}
Next, we gives an exact characterization of graphs with $d+2$ vertices that are representable in $\mathbb{R}^d$. This characterization is symmetric with respect to all vertices, in contrast with Lemma~\ref{ns}, in which one vertex has to be used as a reference. Let $\mathbf{1}$ be the all-ones vector and $\mathbf{1}^{\perp}$ be the orthogonal complement of the span of $\mathbf{1}$.
\begin{prop} \label{1and2}
    Let $G$ be a graph on $d+2$ vertices. Then $G$ is representable in $\mathbb{R}^d$ with ratio $k$ if and only if the following two conditions hold.
    \begin{enumerate}[label={$(\arabic*)$}]
        \item For all vectors $w\in \mathbf{1}^{\perp}$ we have $w^TB_G(k)w \geq 0$.
        \item There exists a nonzero vector $w\in \mathbf{1}^{\perp}$ such that $B_G(k)w = \gamma \mathbf{1}$ for a real number $\gamma$.
    \end{enumerate}

\end{prop}
\begin{proof}
We define $B_G' = \left(I - \mathbf{1} e_1^T\right)B_G\left(I - e_1\mathbf{1}^T\right)$, which is equivalent to the definition in Lemma~\ref{ns}. Thus, $G$ is representable in $\mathbb{R}^d$ if and only if
$$B_G' \succeq 0 \text{ and } \rank(B_G') \leq d.$$
We show that these two conditions are equivalent to conditions \ref{eq: 1} and \ref{eq: 2}, respectively.

The condition $B_G' \succeq 0$ is equivalent to $v^T B_G' v \geq 0$ for all vectors $v$. This gives us
$$v^T \left(I - \mathbf{1} e_1^T\right)B_G\left(I - e_1\mathbf{1}^T\right) v \geq 0$$
$$	\Leftrightarrow w^TB_Gw \geq 0, \text{ where } w = \left(I - e_1\mathbf{1}^T\right) v.$$
Note that $w_1 = -\sum_{i = 2}^n v_{i}, w_2 = v_2, w_3 = v_3, \dots, w_{d+2} = v_{d+2},$
so $w$ is a vector in $\mathbf{1}^{\perp}$ and hence condition \ref{eq: 1} implies $B_G' \succeq 0$. Conversely, every vector in $\mathbf{1}^{\perp}$ can be expressed in this form, so $B_G' \succeq 0$ implies condition  \ref{eq: 1} as well.

The condition $\rank(B_G') \leq d $ is equivalent to $\dim \operatorname{null}(B_G') \geq 2$. Observe that $e_1 \in \operatorname{null}(B_G')$, so there exists a vector $v$ independent with $e_1$ such that $\left(I - \mathbf{1} e_1^T\right)B_G\left(I - e_1\mathbf{1}^T\right) v = 0$. This means that there exists $w\perp \mathbf{1}$ such that $\left(I - \mathbf{1} e_1^T\right)B_Gw = 0$, so $B_Gw \in \operatorname{null} \left(I - \mathbf{1} e_1^T\right) = \operatorname{span}(\mathbf{1})$, thus there exists a real number $\gamma$ such that $B_G w = \gamma \mathbf{1}$. Conversely, if there exist a vector satisfying condition \ref{eq: 2}, then it is in the nullspace of $B_G'$ and is independent of $e_1$, so $\rank (B_G') \leq d$.
\end{proof}
\begin{corollary} \label{nullspace}
    The nullspace of $B'_G$ consists of the vector $e_1$ and the space of vectors $w\in \mathbf{1}^{\perp}$ such that $B_G(k)w = \gamma \mathbf{1}$ for some real number $\gamma$.
\end{corollary}
We now consider the conditions for a graph to be spherical. Denote by $J$ the all-ones matrix.

\begin{lemma} \label{3and4}
Let $G$ be a graph on $d+2$ vertices that is representable in $\mathbb{R}^d$ with ratio $k$. It has a spherical representation with ratio $k$ if and only if the following two conditions hold:
\begin{enumerate}[label={$(\arabic*)$}]
    \setcounter{enumi}{2}
    \item $\det(xJ + B_G)$ is the zero polynomial.
    \item There exists $r_0 = r_0(B_G)\in \mathbb{R}$ such that $rJ+B_G  \succeq 0$ for all $r\geq r_0$.
\end{enumerate}
\end{lemma}
\begin{proof}
    We first show the only if direction. Suppose that $G$ is a graph on $d+2$ vertices which can be representable in $\mathbb{R}^d$ with ratio $k$, and its corresponding 2-distance set is spherical. Take the center $O$ of the sphere and take a point $O_1$ on the line in $\mathbb{R}^{d+1}$ through $O$ that is orthogonal to the subspace $\mathbb{R}^d$ where $G$ is representable. The distance between every point from the 2-distance set and $O_1$ is the same and is denoted by $x_1$. Note that we can choose any $x_1\geq \sqrt{r_0/2}$ where $r_0$ is the radius of the circumsphere of the 2-distance set that corresponds to $G$. By Lemma~\ref{ns}, we see that $B' = 2x_1^2J+B_G \succeq 0$ for all $x_1 \geq \sqrt{r_0/2}$, so condition \ref{eq: 4} holds for $r\geq r_0$, and $\rank(B') \leq d+1$, i.e., $\det(B') = 0$. Since $\det(B')$ is a polynomial in $x_1$ which vanishes for all $x_1 \geq \sqrt{r_0/2}$, it must be the zero polynomial, so condition \ref{eq: 3} holds.

    We now show the if direction. Suppose that $G$ is representable in $\mathbb{R}^d$ with ratio $k$ and conditions \ref{eq: 3} and \ref{eq: 4} hold. Take $r = r_0$. Since $rJ + B_G$ is positive semidefnite and $\rank(rJ+B_G) \leq d+1$, by Lemma~\ref{ns} the 2-distance set corresponding to $G$ is inscribed in a sphere with radius $r$ in $\mathbb{R}^{d+1}$ but it also lies on a subspace isomorphic to $\mathbb{R}^d$, so it lies in the intersection of the sphere and an $d$-dimensional hyperplane, which is isomorphic to a sphere in $\mathbb{R}^d$. This means that the 2-distance set corresponding to $G$ is spherical.
\end{proof}
By combining Proposition~\ref{1and2} and Lemma~\ref{3and4}, we obtain a set of four conditions that is necessary and sufficient for $G$ to be representable in $\mathbb{R}^d$ with ratio $k$ using only the matrix $B_G$.
\begin{enumerate}[label={(\arabic*)}]
    \item \label{eq: 1} For all vectors $w\in \mathbf{1}^{\perp}$ we have $w^TB_Gw \geq 0$.
    \item \label{eq: 2} There exists a nonzero vector $w\in \mathbf{1}^{\perp}$ such that $B_Gw = \gamma \mathbf{1}$ for a real number $\gamma$.
    \item \label{eq: 3} $\det(xJ + B_G)$ is the zero polynomial.
    \item \label{eq: 4} There exists $r_0 = r_0(B_G)\in \mathbb{R}$ such that $rJ+B_G  \succeq 0$ for all $r\geq r_0$.
\end{enumerate}

We first simplify condition~\ref{eq: 3}:

\begin{lemma} \label{remr}
If a graph $G$ on $d+2$ vertices with a distance ratio $k$ satisfies condition \ref{eq: 2}, then \ref{eq: 3} holds if and only if $\det(B_G) = 0$.
\end{lemma}
\begin{proof}

It is clear that condition \ref{eq: 3} implies $\det(B_G) = 0$, so we only need to show the converse.

Assume that $\det(B_G) = 0$. Thus, there exists a vector $u \neq 0$ such that $B_Gu = 0$. From \ref{eq: 2}, there exists $w\in \mathbf{1}^{\perp}$ such that $B_Gw = \gamma \mathbf{1}$. It therefore suffices to show that for every $x$, there exists a nonzero vector $v$ such that $(xJ+B_G)v = 0$.

First, if $\gamma = 0$, then $(xJ+B_G)w = 0$ for every $x$. Otherwise, take $\beta = -\frac{x \langle u, 1 \rangle}{\gamma}$. Then,
    \begin{align*}
        (xJ+B_G)(u+\beta w) & = xJu + \beta xJw + B_Gu + \beta B_Gw\\
        & = x \langle u, \mathbf{1} \rangle \mathbf{1} + \beta x \mathbf{0} + \mathbf{0} + \beta \gamma \mathbf{1} \\
        & = (x \langle u, \mathbf{1} \rangle + \beta \gamma)\mathbf{1}  = 0.
    \end{align*}
Note that $u+\beta w \neq 0$ because otherwise $u$ and $w$ would have been collinear, which gives us $Bw = 0$, so $\gamma = 0$. Thus, for every $x$ there exists a nonzero vector $v$ such that $(xJ+B_G)v = 0$, as needed.
\end{proof}
We let $\det(B_G) = 0$ be condition \setword{(3')}{eq: 3'}.
\section{Second eigenvalue of the adjacency matrix}\label{secondeigen}

From Lemma~\ref{remr}, we can find a formula for $B_G$ which does not depend on the ratio of the 2-distance set. Conversely, if this formula for $B_G$ holds, then we prove that condition \ref{eq: 1} implies conditions \ref{eq: 2} and \ref{eq: 3'}.

First, we transform the matrix $B_G$ to a new matrix $\overline{B_G}$ which is more closely related to the adjacency matrix $A_G$ and rewrite conditions \ref{eq: 1}-\ref{eq: 4} in terms of $\overline{B_G}$.

\begin{prop} \label{prop:newconds}
A graph $G$ on $d+2$ vertices is spherical in $\mathbb{R}^d$ with distance ratio $k$ if and only if the following conditions hold for $\overline{B_G} = \overline{B_G}(k) = \frac{1}{k^2-1} (B_G+J) = \frac{1}{k^2-1}I - A_G$:
\begin{enumerate}[label={$\overline{(\arabic*)}$}]
    \item \label{1bar} For all $w \in \mathbf{1}^{\perp}$ we have $w^T\overline{B_G} w \geq 0$.
    \item \label{2bar} There exists a nonzero vector $w\in \mathbf{1}^{\perp}$ such that $\overline{B_G} w =\gamma \mathbf{1}$ for some real number $\gamma$.
    \item \label{3bar} $\det(\overline{B_G}) = 0$.
    \item \label{4bar}There exists $r_0\in \mathbb{R}$ such that for all $r\geq r_0$ we have $rJ + \overline{B_G} \succeq 0$.
\end{enumerate}
\end{prop}

\begin{proof}
It suffices to show that the conditions \ref{1bar}, \ref{2bar}, \ref{3bar}, and \ref{4bar} are equivalent to conditions \ref{eq: 1}, \ref{eq: 2}, \ref{eq: 3}, and \ref{eq: 4} respectively.
The first two are clearly equivalent to the original conditions because $\overline{B_G} w = \frac{1}{k^2-1}(B_G+J)w = \frac{1}{k^2-1} B_G w$ for all $w \in \mathbf{1}^{\perp}$.
Condition \ref{eq: 3} is equivalent to $\det(xJ +\overline{B_G}) \equiv 0$ by a change of variable: \[\det \left(xJ + \frac{1}{k^2 - 1}(B_G + J) \right) = \left(\frac{1}{k^2-1}\right)^{d+2} \det \big((x(k^2-1)+1)J + B_G\big).\] By the same proof as in Lemma~\ref{remr} we see that this is also equivalent to condition \ref{3bar}.
Condition \ref{4bar} is equivalent to $B_G + (r(k^2-1)+1)J \succeq 0$ for sufficiently large $r$, which is the same as condition \ref{eq: 4}.
\end{proof}

We now find a formula for $\overline{B_G}$ in terms of the second eigenvalue of the adjacency matrix. This also gives us a formula for $B_G$ that does not depend on $k$.
\begin{lemma} \label{lbd2}
Let $G$ be a graph on $d+2$ vertices. Suppose that it satisfies conditions \ref{2bar} and  \ref{3bar} for some $k>1$, then
$B_G = I - \frac{1}{\lambda_2}A_G -J $.
\end{lemma}
\begin{proof}
Let $m = \frac{1}{k^2-1}$, so $\overline{B_G} = mI - A_G$. By Lemma~\ref{remr}, $\det(\overline{B_G}) = 0$, so there exists an eigenvector $v$ of $A_G$ that has eigenvalue $m = \lambda_i$ for some $i$. By condition \ref{1bar}, $x^T\overline{B_G} x \geq 0$ for $x\in \mathbf{1}^{\perp}$ which is equivalent to $x^TA_G x \leq mx^Tx$, i.e., $\frac{x^TA_Gx}{x^Tx} \leq m$ for every $x\in \mathbf{1}^{\perp}$. So, by the Courant–Fischer–Weyl min-max principle \cite{horn2012matrix} we have
    $$\lambda_2 = \min_{\substack{U \\ \dim(U) = d-1}} \left\{ \max_{x\in U} \frac{x^TA_Gx}{x^Tx} \right\} \leq \max_{x\in \mathbf{1}^{\perp} } \frac{x^TA_Gx}{x^Tx} \leq m.$$
By condition \ref{2bar}, there exists a vector $x_1 \in \mathbf{1}^{\perp}$ such that $x_1^T(mI - A_G)x_1 = 0$ or equivalently $m = \frac{x_1^TA_Gx_1}{x_1^Tx_1}$. But $m = \lambda_i$ for some $i$, so $m\leq \lambda_1$.

If $\lambda_1 = \lambda_2$, then $m = \frac{x_1^TA_G x_1}{x_1^Tx_1}\leq \lambda_1 = \lambda_2$ by the min-max principle.

If $\lambda_1 > \lambda_2$, then $v_1 \not \in \mathbf{1}^{\perp}$ because $\lambda_1$'s eigenvector $v_1$ has nonnegative coordinates. Since $\frac{x^TA_Gx}{x^Tx} = \lambda_1$ holds if and only if $x\in \operatorname{span}(v_1)$ and $x_1 \not \in \operatorname{span} (v_1)$, so $m < \lambda_1$ thus $m \leq \lambda_2$.

Therefore $\lambda_2 \leq m \leq \lambda_2$, so $m = \lambda_2$. Undoing the transformations of $B_G$, we obtain $B_G = I - \frac{1}{\lambda_2}A_G -J$, as needed.
\end{proof}

This gives us a formula for $k$ in terms of $\lambda_2$.

\begin{corollary}
Given graph $G$ on $d+2$ vertices. If $G$ is spherical, then the distance ratio is $\sqrt{\frac{1}{\lambda_2} + 1}$. (In particular, this implies that $\lambda_2 > 0$.)
\end{corollary}

\begin{proof}
From the proof of Lemma~\ref{lbd2}, we have $\frac{1}{k^2 - 1} = m = \lambda_2$, so we have $k = \sqrt{\frac{1}{\lambda_2} + 1}$.
\end{proof}

Therefore, we can rephrase Proposition \ref{prop:newconds} with the definition $\overline{B_G} = \lambda_2 I - A_G$ instead of the original definition, which removes the need to consider $k$ altogether.

Using Lemma~\ref{lbd2} we can also prove that one of the eigenvectors of $\lambda_2$ is in $\mathbf{1}^{\perp}$.

\begin{lemma}\label{v2}
Let $G$ be a graph on $d+2$ with ratio $k$ that satisfies conditions \ref{1bar}, \ref{2bar}, and \ref{3bar}.
There exists an eigenvector  $v_2$ of $\lambda_2$ that is orthogonal to $\mathbf{1}$.
\end{lemma}

\begin{proof}
Let $v_1$ be an eigenvector of $\lambda_1$ and $v_2$ be an eigenvector of $\lambda_2$ such that $\langle v_1, v_2 \rangle = 0$ and let $|| v_1|| = ||v_2|| = 1$. The subspace $\operatorname{span}(v_1, v_2)$ has dimension 2, so it intersects $\mathbf{1}^{\perp}$ in a line or a plane. This means that there exist real numbers $\alpha$ and $\beta$ such that $\alpha v_1 + \beta v_2 \in \mathbf{1}^{\perp}$ (where $\alpha$ and $\beta$ are not both equal to $0$). The matrix $\overline{B_G} = \lambda_2 I - A_G$ by Lemma~\ref{lbd2}, so it has $v_2$ in its nullspace. By condition~\ref{1bar},
\begin{align*}
    0 & \leq (\alpha v_1 + \beta v_2)^T \overline{B_G} (\alpha v_1 + \beta v_2)\\
    & = \alpha^2 v_1^T\overline{B_G} v_1 + \beta^2 v_2^T\overline{B_G} v_2+ \alpha \beta (v_1^T\overline{B_G} v_2 + v_2^T\overline{B_G} v_1) \\
    & = \alpha^2 (\lambda_2 v_1^T v_1 - v_1^TA_Gv_1) + \beta^2 v_2^T\overline{B_G} v_2 + \alpha \beta v_1^T\overline{B_G} v_2 + \alpha \beta (v_1^T\overline{B_G} v_2)^T\\
    & = \alpha^2 (\lambda_2 v_1^T v_1 - v_1^TA_Gv_1)\\
    & = \alpha^2 (\lambda_2 - \lambda_1).
\end{align*}

Since $\alpha^2 (\lambda_2 - \lambda_1)$ is clearly nonpositive, this means that either $\lambda_1 = \lambda_2$ or $\alpha = 0$. In the first case $\lambda_2$'s eigenspace has dimension at least 2, so there is a nonzero intersection with $\mathbf{1}^{\perp}$, so we can set $v_2 \in \mathbf{1}^{\perp}$. In the second case we have $\beta v_2 \in \mathbf{1}^{\perp}$, and $\beta \neq 0$, so $v_2 \in \mathbf{1}^{\perp}$.
\end{proof}

\begin{corollary}\label{cor2}
    If $G$ is a graph with ratio $k$ that satisfies conditions \ref{1bar}, \ref{2bar}, and \ref{3bar} then if $\lambda_1 > \lambda_2$, all eigenvectors of $\lambda_2$ are in $\mathbf{1}^{\perp}$, and if $\lambda_1 = \lambda_2$, then all but one vector of the eigenbasis of $\lambda_2$ can be chosen to be in $\mathbf{1}^{\perp}$.
\end{corollary}

\begin{proof}
From the proof of Lemma~\ref{v2}, we can see that the eigenspace of $\lambda_2$ is in $\mathbf{1}^{\perp}$ when $\lambda_1 > \lambda_2$. If $\lambda_1 = \lambda_2$, we can choose the eigenbasis of $\lambda_2$ so that at most one of the basis vectors is not in $\mathbf{1}^{\perp}$, so we can assign it to be the eigenvector for $\lambda_1$.
\end{proof}

Now, we are ready to prove that condition \ref{1bar} implies conditions \ref{2bar} and \ref{3bar}, so we can remove the latter two from Proposition \ref{prop:newconds}.

\begin{lemma}\label{1l}
Given a graph $G$ on $d+2$ vertices and $\overline{B_G} = \lambda_2 I - A_G$. If for every $w \in \mathbf{1}^{\perp}$ $w^T\overline{B_G} w \geq 0$, then conditions \ref{2bar} and \emph{\ref{eq: 3'}} are satisfied.
\end{lemma}
\begin{proof}
    By the proof of Lemma~\ref{v2}, if condition \ref{1bar} is true for the matrix $\overline{B_G} = \lambda_2 I - A_G$, then the eigenvector $v_2$ of the second largest eigenvalue is in $\mathbf{1}^{\perp}$. From this we can deduce that $\overline{B_G} v_2 = 0$, which implies both conditions \ref{2bar} and \ref{eq: 3'}.
\end{proof}

\section{Reduction of the positive-semidefinite condition} \label{reduction}

In this section we simplify condition \ref{4bar}. To do this, we use condition~\ref{1bar} to reduce condition\ref{4bar} to the existence of an upper bound on $\displaystyle \frac{(\mathbf{1}^T A_G v)^2}{\lambda_2 v^T v - v^TA_G v}$ for $v\in \mathbf{1}^{\perp}$. Lemma~\ref{pom} gives a necessary and sufficient condition for the existence of this bound.
\begin{lemma}\label{pom}
Let $G$ be a graph on $d+2$ vertices such that $\overline{B_G} = \lambda_2 I - A_G$, and $\overline{B_G}$ satisfies condition \ref{1bar}, and let $V$ be a subspace of $\mathbf{1}^{\perp}$. There exists a real number $r$ such that
\begin{equation}\label{ineq}
    r(d+2)(\lambda_2v^Tv - v^TA_Gv) \geq (\mathbf{1}^T A_G v)^2 \text{ for every } v\in V
\end{equation}
if and only if $\mathbf{1}^TA_Gv = 0$ for all vectors $v\in V$ such that $\lambda_2 v^Tv = v^TA_Gv$.
\end{lemma}
\begin{proof}
    The forward direction is straightforward.
    For the reverse direction, we induct on the dimension of $V$. The base case $\dim (V) = 0$ is trivial.    For the inductive step, assume that $V$ has dimension at least one and that the statement hold for all subspaces of $\mathbf{1}^{\perp}$ with lower dimension. Divide both sides of inequality \eqref{ineq} by $v^Tv$ to obtain
    \begin{equation*}
        r(d+2)\left(\lambda_2 - \frac{v^TA_Gv}{v^Tv}\right) \geq \frac{(\mathbf{1}^T A_G v)^2}{v^Tv}.
    \end{equation*} By Cauchy-Schwartz’s inequality, we can bound the absolute value of the right-hand side $\left|\frac{(\mathbf{1}^TA_G v)^2}{v^Tv}\right| \leq ||\mathbf{1}^T A_G||^2$. Denote by
    \begin{equation*}
    f(v) = \left(\lambda_2 - \frac{v^TA_Gv}{v^Tv}\right).
    \end{equation*}
    Let $L = \displaystyle \inf_{\substack{v\in V \\ v\neq 0}} f(v)$. Note that $L\geq 0$ by condition \ref{1bar}. If $L>0$, the inequality is true for every $r \geq \frac{||1^TA_G||^2}{(d+2)L}$. If $L = 0$, then as $f$ is invariant under scaling, so $L$ is also the infimum of $f$ on the unit sphere, which is compact. Therefore, this infimum is achieved, i.e., there exists a vector $w$ such that $f(w) = 0$. By the inductive hypothesis the inequality holds for all $v \in V\cap \operatorname{span}(w)^{\perp}$. If $v$ is not perpendicular to $w$, by scaling $v$ we can write $v = w + \varepsilon x$ where $||x|| = 1$ and $x\perp w$. The inequality becomes
    $$ r(d+2)(\lambda_2 + \lambda_2 \varepsilon^2 - w^TA_Gw - 2\varepsilon x^TA_Gw - \varepsilon^2 x^TA_Gx) \geq (\mathbf{1}^T A_G w + \varepsilon \mathbf{1}^T A_G x)^2 $$
    \begin{equation} \label{quadratic}
        r(d+2)(\lambda_2 \varepsilon^2 - 2\varepsilon x^TA_Gw - \varepsilon^2 x^TA_Gx) \geq (\varepsilon \mathbf{1}^T A_G x)^2.
    \end{equation}

    Inequality \eqref{quadratic} is a quadratic inequality in $\varepsilon$ with zero constant term, so the linear term should also be zero, i.e., $x^TA_Gw = 0$. Going back to inequality \eqref{quadratic} and dividing by $\varepsilon^2$ we get \begin{equation*}
        r(d+2)(\lambda_2 - x^TA_Gx) \geq (\mathbf{1}^T A_G x)^2
    \end{equation*} for $x \in V\cap \operatorname{span}(w)^{\perp}$ that has lower dimension than $V$, so the inductive step is completed.

\end{proof}
We are now equipped to simplify condition \ref{4bar}. We prove that it is equivalent to condition \ref{1bar} combined with a new condition \ref{eq: 5}.
\begin{lemma}\label{ref4}
A graph $G$ on $d+2$ vertices is spherical if and only if $w^T\overline{B_G} w \geq 0$ for all vectors $w \in \mathbf{1}^{\perp}$ where $\overline{B_G} = \lambda_2 I - A_G$, and
\begin{enumerate}[label={$\overline{(\arabic*)}$}]
\setcounter{enumi}{4}
\item \label{eq: 5} $\mathbf{1} ^T A_Gw = 0$ for all vectors $w\in \mathbf{1}^{\perp}$ such that $w^T\overline{B_G} w = 0$.
\end{enumerate}
\end{lemma}
\begin{proof}
    We can easily see that condition \ref{4bar} implies condition \ref{1bar}, so if we know that  \ref{4bar} holds for the matrix $\overline{B_G} = \lambda_2 I - A_G$, then by Lemma~\ref{1l} we also have conditions \ref{2bar} and \ref{3bar}, so $G$ has a spherical representation.

    Thus, we need to check that condition \ref{1bar} combined with the fact that  $\mathbf{1}^TA_Gw = 0$ for all vectors $w\in \mathbf{1}^{\perp}$ such that $\lambda_2 w^Tw = w^TA_Gw$ is equivalent to condition \ref{4bar}.

    Every vector $u$ can be expressed as $\alpha \mathbf{1} + \beta v$ where $v \in \mathbf{1}^{\perp}$. So, condition \ref{4bar} states that for all $\alpha, \beta, v$ and sufficiently large $r$
    \begin{align*}
        0 & \leq (\alpha \mathbf{1} + \beta v)^T(rJ + \lambda_2 I - A_G)(\alpha \mathbf{1} + \beta v) \\
         & = r (\alpha \mathbf{1} + \beta v)^T J (\alpha \mathbf{1} + \beta v) + (\alpha \mathbf{1} + \beta v)^T(\lambda_2 I - A_G)(\alpha \mathbf{1} + \beta v).
    \end{align*}

    As $\operatorname{span}(J) = \operatorname{span}(\mathbf{1})$, the right-hand side expression is equal to
    \begin{align*}
    & \alpha^2 r(d+2) + (\alpha \mathbf{1} + \beta v)^T(\lambda_2 I - A_G)(\alpha \mathbf{1} + \beta v) \\
    =\  & \alpha^2 r(d+2) + \lambda_2 (\alpha \mathbf{1} + \beta v)^T(\alpha \mathbf{1} + \beta v) - (\alpha \mathbf{1} + \beta v)^TA_G(\alpha \mathbf{1} + \beta v)\\
    =\  & \alpha^2 r(d+2) + \lambda_2 \alpha^2 (d+2) + \lambda_2 \beta^2v^Tv - (\alpha \mathbf{1} + \beta v)^TA_G(\alpha \mathbf{1} + \beta v)\\
    =\  & \alpha^2 r(d+2) + \lambda_2 \alpha^2 (d+2) + \lambda_2 \beta^2v^Tv - \alpha^2 \mathbf{1}^TA_G\mathbf{1} - \beta^2 v^TA_Gv - 2\alpha \beta \mathbf{1}^T A_G v \\
    =\  & \alpha^2\left( \lambda_2  (d+2) - \mathbf{1}^TA_G\mathbf{1} + r(d+2)\right) - 2\alpha \beta \mathbf{1}^T A_G v + \beta^2(\lambda_2 v^Tv -  v^TA_Gv).
     \end{align*}
If $\alpha = 0$ this becomes condition \ref{1bar}.

Assume that $\alpha\neq 0$. The first two terms in the coefficient of $\alpha^2$ are constants, so we can ignore them and increase $r$ by a constant. So, we want
\begin{equation*}
    \alpha^2 r(d+2) - 2\alpha \beta \mathbf{1}^T A_G v + \beta^2(\lambda_2 v^Tv -  v^TA_Gv) \geq 0.
\end{equation*}
Thus the discriminant of the quadratic polynomial should be non-positive. That is \begin{equation*}
    r(d+2)(\lambda_2 v^Tv -  v^TA_Gv) \geq (\mathbf{1}^T A_G v)^2
\end{equation*}for sufficiently large $r$, which reduces the lemma to Lemma~\ref{pom}.
\end{proof}
 By condition \ref{eq: 5}, for all $w\in \mathbf{1}^{\perp}$ such that $w^T\overline{B_G} w = 0$ we have $A_Gw \in \mathbf{1}^{\perp}$. It turns out that if conditions \ref{1bar} and \ref{eq: 5} hold simultaneously, then a stronger condition is true $A_Gw = \lambda_2 w$  for all $w\in \mathbf{1}^{\perp}$ such that $w^T\overline{B_G} w = 0$. Therefore all vectors for which equality holds in condition \ref{1bar} are eigenvectors of $A_G$ with eigenvalue $\lambda_2$, i.e., null vectors of $\overline{B_G}$.
\begin{lemma}\label{last}
Let $G$ be a graph on $d+2$ vertices. Then $G$ has a spherical representation if and only if condition \ref{1bar} holds for $\overline{B_G} = \lambda_2 I - A_G$, and for every vector $w \in \mathbf{1}^{\perp}$ such that $w^T\overline{B_G} w = 0$ we have $\overline{B_G} w = 0$.
\end{lemma}
\begin{proof}
By Lemma~\ref{ref4}, it suffices to show that if $w^T\overline{B_G} w = 0$, then $A_Gw \in \mathbf{1}^{\perp}$ is equivalent to $\overline{B_G} w = 0$. From the proof of Lemma~\ref{pom} we know that $x^TA_Gw = 0$ for all $x\in \mathbf{1}^{\perp}$ and $x \perp w$ an thus $A_Gw \in \operatorname{span}(1,w)$. Therefore $A_G w \in \operatorname{span}(w)$, so $w$ is an eigenvector of $A_G$. If its eigenvalue is $\lambda$, then $$0 = \lambda_2 w^T w - w^T A_G w  = (\lambda_2 - \lambda)w^Tw.$$
This means that $\lambda = \lambda_2$, so $\overline{B_G} w = \lambda_2 w - A_Gw = 0$. Thus if equality holds in condition \ref{1bar}, then $\overline{B_G} w = 0$. On the other hand, if $\overline{B_G} w = 0$, then $\lambda_2 w - A_Gw = 0$, so $1^TA_Gw = \lambda_2 1^T w = 0$ which is equivalent to $w^T\overline{B_G} w = 0$ by Lemma~\ref{ref4}.
\end{proof}

\section{Proof of the main theorem}\label{finsec}
We now use Lemma~\ref{last} to prove Theorem~\ref{mainres} and Proposition~\ref{lowestdimensionspherical}.

\begin{proof}[Proof of Theorem~\ref{mainres}]

    Let the eigenvalues of $PA_G P$ be $\mu_1\geq \mu_2 \geq \dots \geq \mu_{d+1}$ and 0 where 0 corresponds to the eigenvector $\mathbf{1}$. Suppose that the maximum eigenvalue of $PA_GP$ is $\lambda_2$. The matrices $PA_GP$ and $P\overline{B_G} P$ have the same set of eigenvectors. Therefore the spectrum of $P\overline{B_G} P$ is the set $\lambda_2 - \mu_1, \lambda_2 - \mu_2, \dots, \lambda_2 - \mu_{d+1}, 0$. Thus all eigenvalues of $P\overline{B_G} P$ are nonnegative, so condition \ref{1bar} holds for $\overline{B_G}$. Conversely, if condition~\ref{1bar} holds, then $\mu_1 \geq \lambda_2$. Furthermore, by Lemma~\ref{1l}, conditions \ref{2bar} and \ref{3bar} hold. So, by Lemma~\ref{v2}, there is an eigenvector with an eigenvalue $\lambda_2$ of $A_G$ such that $v_2\in \mathbf{1}^{\perp}$, thus $v_2$ is an eigenvector of $PA_GP$ and $P\overline{B_G} P$, so $\mu_1 \geq \lambda_2$. Thus $\mu_1 = \lambda_2$.

    Now, by Lemma~\ref{last}, we have to prove that if we assume condition \ref{1bar} holds for $\overline{B_G}$, then the following two conditions are equivalent.
    \begin{itemize}
        \item [(a)]The multiplicity of $\lambda_2$ in $A_G$ (excluding $\lambda_1$ if $\lambda_1 = \lambda_2$) is equal the multiplicity of $\lambda_2$ in $PA_G$.
        \item [(b)] We have $w^T\overline{B_G} w = 0$ if and only if $\overline{B_G} w = 0$ for all $w\in \mathbf{1}^{\perp}$.
    \end{itemize}

    Condition \ref{1bar} holds for $\overline{B_G}$, so by Lemma~\ref{1l}, conditions \ref{2bar} and \ref{3bar} hold, thus Corollary~\ref{cor2} holds and every eigenvector of $\lambda_2$ (except the eigenvector of $\lambda_1$ when $\lambda_1 = \lambda_2$) is also an eigenvector of $PA_GP$, thus the multiplicity of $\lambda_2$ in $A_G$ (excluding $\lambda_1$ when $\lambda_1 = \lambda_2$) is at most the multiplicity of $\lambda_2$ in $P A_G P$. By condition \ref{1bar} $w^T\overline{B_G} w = 0$ if and only if $w$ is an null vector of $P\overline{B_G} P$, i.e., an eigenvector of $\lambda_2$ in $A_G$. So, if $w^T\overline{B_G} w = 0$ is true only if $\overline{B_G} w = 0$, i.e., $w$ is an eigenvector of $\lambda_2$ in $A_G$, then the the multiplicity of $\lambda_2$ in $A_G$ (excluding $\lambda_1$ when $\lambda_1 = \lambda_2$) is at least the multiplicity of $\lambda_2$ in $P A_G P$, so they are equal. The reverse also holds.
\end{proof}
    We can combine \cref{mainres} with Corollary~\ref{nullspace} to obtain the lowest dimensional space in which a given 2-distance set is representable.
\begin{proof}[Proof of Proposition~\ref{lowestdimensionspherical}]
    By Lemma~\ref{main}, $G$ is representable in $\mathbb{R}^n$ if and only if $\rank (B'_G) \leq n$ where $B'_G= \left(I - \mathbf{1} e_1^T\right)B_G\left(I - e_1\mathbf{1}^T\right).$ Let $S$ be the space of vectors $w\in \mathbf{1}^{\perp}$ such that $B_Gw = \gamma \mathbf{1}$ for some real number $\gamma$. By Corollary~\ref{nullspace}, $\rank (B'_G) = d+2 - 1 - \rank(S) = d+1 - \rank(S)$. Note that the nullspace of $PB_GP$ which is $\mathbf{1} \cup S$, thus $\rank(PB_GP) = d+2 - 1 -\rank (S) = d+1-\rank(S) = \rank (B'_G)$, so $\rank (B'_G) \leq n$, but the nullspace of $PB_GP$ is the union of $\mathbf{1}$ and eigenspace of $\lambda_2$ in $PA_GP$.  For spherically representable graphs the multiplicity of $\lambda_2$ in $PA_GP$ is the same as the multiplicity of $\lambda_2$ in $A_G$. Therefore, $G$ is representable in $\mathbb{R}^n$ if the multiplicity of $\lambda_2$ in $A_G$ is at least $d+1-n$.
\end{proof}
We also give an equivalent formulation of \cref{mainres} using the Cauchy interlacing theorem, which gives a more intuitive understanding of what \cref{mainres} means.
\begin{theorem}[Cauchy interlacing theorem \cite{hwang2004cauchy}]
    Let $A$ be a symmetric $n \times n$ matrix and $B$ be an $m \times m$ matrix with $B = PAP^*$ where $P$ is an orthogonal projection onto a subspace of dimension $m$. Then if the eigenvalues of $A$ are $\alpha_1 \geq \alpha_2 \geq \dots \geq \alpha_n$ and the eigenvalues of $B$ are $\beta_1 \geq \beta_2 \geq \dots \geq \beta_m$, then for all $j \leq m$
    $$\alpha_j \geq \beta_j \geq \alpha_{j+n-m}.$$
\end{theorem}
In our case, if the eigenvalues of $PA_GP$ are $\mu_1 \geq \mu_2 \geq \dots \geq \mu_{n-1}$, then \[\lambda_1 \geq \mu_1 \geq \lambda_2 \geq \mu_2 \geq \dots \geq \lambda_k \geq \mu_k \geq \lambda_{k+1} \geq \dots \geq \lambda_n.\]
The condition of \cref{mainres} is therefore equivalent to $\mu_1 = \lambda_2$ and $\mu_k < \lambda_k$, where $k$ is such that $\lambda_{k+1} < \lambda_k = \lambda_2$. Proposition~\ref{lowestdimensionspherical} implies that the lowest representable dimension of a spherical graph on $n$ vertices is $n - k$.

The main theorem also implies that all small regular graphs have a spherical representation:
\begin{corollary}
    If $G$ is a regular graph on $d+2$ vertices that is not complete multipartite, then $G$ has a spherical representation in $\mathbb{R}^d$.
\end{corollary}
\begin{proof}
    If $G$ is a regular graph, then the eigenvector of the first eigenvalue is $\mathbf{1}$, thus $\mu_i = \lambda_{i+1}$ for $i = 1,2\dots, n-1$, which clearly satisfies \cref{mainres}.
\end{proof}

It may be possible to derive more necessary or sufficient combinatorial conditions for a graph to be spherical based on our main theorem.

\section{Computational Results}\label{compres}
Using \cref{mainres}, we can provide a fast algorithm with complexity of $\Theta(n^{\omega})$ (where $\omega \approx 2.373$ is the exponent in the complexity of the best-known algorithm for matrix multiplication) for testing if a graph has a spherical representation. We used our algorithm to find all spherical graphs with up to 9 vertices and the lowest dimension in which each one is representable. The results are listed in Table \ref{tab:count}.
\begin{table}[ht]
    \centering
    \begin{tabular}{|c|r|r|r|r|r|}
    \hline
     & \multicolumn{5}{c|}{Minimum dimension ($d$)} \\
    \# Points ($n$) & 3 & 4  & 5   & 6    & 7     \\ \hline
    6               & 6 & 36 & --- & ---  & ---   \\
    7               & 0 & 23 & 175 & ---  & ---   \\
    8               & 0 & 7  & 122 & 1409 & ---   \\
    9               & 0 & 2  & 65  & 1037 & 18007 \\ \hline
    \end{tabular}
    \caption{Number of non-equivalent $n$-point spherical 2-distance sets that can be embedded in $\mathbb{R}^d$ but not $\mathbb{R}^{d-1}$.}\label{tab:count}
\end{table}

The spherical 2-distance sets in $\mathbb{R}^4$ have been previously enumerated by Szöllősi (\cite{szollHosi2018two}, Propositions 2--5). One can check that our results agree with theirs.

We also used random sampling to estimate the probability that a random graph with $n$ vertices is spherical, for larger values of $n$. The results are listed in Table \ref{tab:frac}.

\begin{table}[ht]
    \centering
    \begin{tabular}{|c|c|c|}
    \hline
    \# Vertices ($n$) & \% Spherical & \# Samples \\ \hline
    8                 & 8.282\%      & $10^5$ \\
    9                 & 3.541\%      & $10^5$ \\
    10                & 0.980\%      & $10^6$ \\
    12                & 0.111\%      & $10^6$ \\
    15                & 0.048\%      & $10^7$ \\ \hline
    \end{tabular}
    \caption{Estimated fraction of graphs on $n$ vertices that are spherical.}\label{tab:frac}
\end{table}

Notice that the fraction of spherical graphs appear to converge to zero, unlike the case of normal respresentable graphs. (Recall that by Theorem \ref{main}, a graph is representable as long as it is not complete multipartite.) It would be interesting to find an asymptotic estimate for the fraction of the spherical graphs with $n$ vertices.

\bigskip

\paragraph{\bfseries Acknowledgments.}
The bulk of this research was conducted during Research Science Institute (RSI) hosted by the Center for Excellence in Education (CEE) at Massachusetts Institute of Technology (MIT), where the first author was a participant and the second author was a research mentor. We thank Dr.~Tanya Khovanova, Prof.~David Jerison and Prof.~Ankur Moitra for helpful discussions during the RSI program. We thank Eli Meyers for his help with various technical issues during the project, and Dr.~John Rickert and Yunseo Choi for their feedback on earlier versions of this paper.

Combinatorics (math.CO); Metric Geometry (math.MG)


Upper and Lower Bounds on Zero-Sum Generalized Schur Numbers

Abstract: Let $S_{\mathfrak{z}}(k,r)$ be the least positive integer such that for any $r$-coloring $\chi : \{1,2,\dots,S_{\mathfrak{z}}(k,r)\} \longrightarrow \{1, 2, \dots, r\}$, there is a sequence $x_1, x_2, \dots, x_k$ such that $\sum_{i=1}^{k-1} x_i = x_k$, and $\sum_{i=1}^{k} \chi(x_i) \equiv 0 \pmod{r}$. We show that when $k$ is greater than $r$, $kr - r - 1 \le S_{\mathfrak{z}}(k,r) \le kr - 1$, and when $r$ is an odd prime, $S_{\mathfrak{z}}(k,r)$ is in fact equal to $kr - r$.

\section{Introduction}
The generalized Schur numbers $S(k,r)$ are an object in Ramsey theory defined to be the least positive integer such that any $r$-coloring of $\{1,2,\dots,\sz{k}{r}\}$ admits a monochromatic solution to $\sum_{i=1}^{k-1} x_i = x_k$. In 1916, Schur proved that $\frac{1}{2}(3^n - 1) \le S(3,n) \le R(n) - 2$, where $R(n)$ is the $n$th diagonal Ramsey number~\cite{schur}.
The lower bound has since been improved to $S(3,n) > c(3.17176)^n$ for some positive constant $c$ by Exoo in 1994~\cite{exoo}. However, since the best upper bounds on diagonal Ramsey numbers are still $\omega((4-\epsilon)^{n})$, there is a very large gap between the lower and upper bounds on Schur numbers.

In 2018 Robertson
 introduced the zero-sum generalized Schur numbers, which relax the monochromatic condition to a zero-sum condition:

 \begin{definition}[\cite{robertson}]
 We call a sequence $x_1, x_2, \dots, x_k$  \emph{$r$-zero-sum} if $\sum_{i=1}^{k} x_i \equiv 0 \pmod{r}$.
 \end{definition}

 A fundamental result in the study of zero-sum sequences is the 1961 Erd\H{o}s-Ginzberg-Ziv theorem, which states that in any set of $2n - 1$ integers, there is a subset of size $n$ which forms an $n$-zero-sum sequence~\cite{egz}. Since then, zero-sum problems have been a fruitful area of research in both additive number theory and Ramsey theory (see~\cite{zerosum} for many examples). More recently, authors have been studying zero-sum sequence problems with more rigid structures imposed upon the sequence (\cite{robertson}, \cite{robertsonvdw}, \cite{brown}). In this paper we will impose the same structure as in the generalized Schur numbers, that the sum of the first $k-1$ terms of the sequence is equal to the final term.

 \begin{definition}
 We denote by $\mathcal{E}$ the equation $\sum_{i=1}^{k-1} x_i = x_k$.
 \end{definition}

 \begin{definition}
 The \emph{zero-sum generalized Schur number} $\sz{k}{r}$ is the least positive integer such that for any $r$-coloring $\chi : \{1,2,\dots,\sz{k}{r}\} \longrightarrow \{1, 2, \dots, r\}$, there is a solution $x_1, x_2, \dots, x_k$ to $\mathcal{E}$ such that $\chi(x_1), \chi(x_2), \dots, \chi(x_k)$ is an $r$-zero-sum sequence.
 \end{definition}

 Note that if $r \nmid k$, then $\sz{k}{r} = \infty$, since there will be no $r$-zero-sum solutions to $\mathcal{E}$ if we color everything with $1$. If $r \mid k$, then any monochromatic solution to $\mathcal{E}$ is automatically $r$-zero-sum, so $\sz{k}{r} \le S(k,r)$.

In 2018, Robertson proved that $\sz{k,2} = 2k - 3$, and also discovered lower bounds on $\sz{k}{r}$ when $r = 2$ or $3$~\cite{robertson}.
In particularly, Robertson proved the following theorems.
\begin{theorem}[\cite{robertson}, Theorem 4]
Let $k \in \mathbb{Z}^+$ with $3 \mid k$. Then $\sz{k}{3} \ge 3k - 3$.
\end{theorem}
\begin{theorem}[\cite{robertson}, Theorem 6]
Let $k \in \mathbb{Z}^+$ with $4 \mid k$. Then $\sz{k}{4} \ge 4k - 5$.
\end{theorem}
Robertson also provided a proposition in the case where $k = r$.
\begin{proposition}[\cite{robertson}, Proposition 7]
Let $k$ be an odd positive integer. Then $\sz{k}{k} \ge 2(k^2  - k - 1)$.
\end{proposition}

These results naturally led Robertson to pose the following four questions regarding $\sz{k}{r}$.
\begin{question}
	 Does $\sz{k}{3} = 3k - 3$ for $3 \mid k$, $k \ge 6$?
\end{question}
\begin{question}
 Does $\sz{k}{4} = 4k - 5$ for $4 \mid k$, $k \ge 8$?
\end{question}
\begin{question}
 What is the exact value of $\szt{k}{4}$? ($\szt{k}{r}$ is the same as $\sz{k}{r}$, except that the coloring only uses the colors $0$ and $1$ rather than any value from $1$ to $r$.)
\end{question}
\begin{question}
 Is it true that $\sz{k}{k}$ is of the order $k^2$?
\end{question}
Question 3 was answered by Robertson, Roy, and Sarkar with the following theorem.
\begin{theorem}[\cite{robertson2}, Theorem 3]
Let $k$ and $r$ be positive integers such that $r \mid k$ and $k > r$. Then, $\szt{k}{r} = rk - 2r + 1$.
\end{theorem}
We resolve the first two questions below, determine the exact value of $\sz{k}{r}$ in the case of $r$ prime and $k > r$, and provide fairly close (within $r$) bounds in other cases where $k > r$.

In particular, we prove the following upper bounds:

\begin{restatable}{theorem}{uprime}
\label{thm:uprime}
Let $r$ be an odd prime and let $k$ be a multiple of $r$ which is at least $2r$. Then $\sz{k}{r} \le kr - r$.
\end{restatable}

\begin{restatable}{theorem}{ufour}
\label{thm:ufour}
Let $k$ be a multiple of $4$ which is at least $8$. Then $\sz{k}{r} \le 4k - 5$.
\end{restatable}

\begin{restatable}{theorem}{ucomp}
\label{thm:ucomp}
Let $r \mid k$, $k \ge 2r$, and $r \ge 6$. Let the prime factors of $r$ be $p_0, p_1, \dots, p_{t_1}$ (the $p_i$ need not be distinct).Then $\sz{k}{r} \le kr - \sum_{i=0}^{t-1}(p_i - 1) - 1$.
\end{restatable}

The last theorem shows that whenever $k$ is a multiple of $r$ which is greater than $r$, $\sz{k}{r} \le kr - 1$.
We also prove two lower bound theorems:
\begin{restatable}{theorem}{lodd}
\label{thm:lodd}
Suppose $r$ is odd. Then $\sz{k}{r} \ge kr - r$.
\end{restatable}
\begin{restatable}{theorem}{leven}
\label{thm:leven}
Suppose $r$ is even. Then $\sz{k}{r} \ge kr - r - 1$.
\end{restatable}
As a corollary, this shows that if $r$ is an odd prime and $k$ is a multiple of $r$ which is greater than $r$, then $\sz{k}{r} = kr - r$. Furthermore, if $r$ is any number and $k$ is a multiple of $r$ which is greater than $r$, then $kr - r - 1 \le \sz{k}{r} \le kr - 1$. Note that while the regular generalized Schur numbers had bounds
with different exponentials even in the simplest case of $k = 3$, it was possible to find similar upper and lower bounds for every case of the zero-sum generalized Schur numbers. We would be interested to know how the bounds given in this paper can be improved, and also whether it is possible to find close upper and lower bounds in other zero-sum Ramsey type problems.

\section{Upper Bounds}

While the result for composite $r$ in Theorem~\ref{thm:ucomp} supersedes the results for prime $r$ in Theorem~\ref{thm:uprime}, we provide separate proofs of each for greater clarity. We begin by restating and proving Theorem~\ref{thm:uprime}.

\uprime*

\begin{proof}
Let $\chi: \{1,\dots,kr - r\} \longrightarrow \{1, \dots, r \}$ be an $r$-coloring. We will show by contradiction that $\chi$ admits a zero-sum solution to $\mathcal{E}$. So, suppose that there is no such solution.
First, we claim that
\begin{equation} \label{recurrence}
2 \chi(\alpha) \equiv \chi(\alpha - 1) + \chi(\alpha + 1) \pmod{r}
\end{equation} for $2 \leq \alpha \leq r-1$.

To show this, let $s$ be any integer between $0$ and $r - 1$. Then the following is a solution to $\mathcal{E}$:
$$(k - 1 - 2s)\cdot \alpha + s \cdot (\alpha - 1) + s \cdot (\alpha + 1) = (k-1)\alpha.$$
Here $a \cdot x$ denotes the sum of a sequence of $a$ copies of $x$.
Hence,
$$(k - 1 - 2s)\chi(\alpha) + s(\alpha - 1) + s(\alpha + 1) + \chi((k-1)\alpha) \not\equiv 0 \pmod{r},$$
which can be rewritten as
$$(k - 1)\chi(\alpha) + \chi((k-1)\alpha) \not\equiv s(2\chi(\alpha) - \chi(\alpha - 1) - \chi(\alpha + 1)).$$
Since $r$ is prime and $s$ can take on any value modulo $r$, this implies that $2 \chi(\alpha) \equiv \chi(\alpha - 1) + \chi(\alpha + 1) \pmod{r}$, as desired.
Since $r \mid k$, applying global translations to $\chi$ does not affect which sequences have zero-sum images under $\chi$, so without loss of generality we may translate $\chi$ so that $\chi(2) \equiv 2\chi(1) \pmod{r}$.
Then by \eqref{recurrence} we have
	\begin{equation} \label{formula}
	\chi(\alpha) \equiv \alpha \chi(1) \pmod{r}
	\end{equation}
for $\alpha \leq r$.
Let $m = kr - r.$ We will show that $\chi(k) \equiv 0 \pmod{r}$ by showing that
		\begin{equation} \label{inequality}
		-\chi(m) \not\equiv s \chi(k) \pmod{r}
		\end{equation}
for $0 \leq s \leq r-1$.

Because $s \le r - 1$, we have $k - 1 - s \le m - sk \le r(k - 1 - s)$, so there exists a sequence $\alpha_1, \dots, \alpha_{k-1-s}$ of integers such that $1 \le \alpha_i \le r$ for all $i$ and $\alpha_1 + \dots + \alpha_{k-1-s} = m - sk$.
Then
$$s\cdot k + \alpha_1 + \dots + \alpha_{k - 1 - s}$$
is a solution to $\mathcal{E}$, so
$$s\chi(k) + \chi(\alpha_1) + \dots + \chi(\alpha_{k - 1- s}) + \chi(m) \not\equiv 0 \pmod{r}.$$
By~\ref{formula}, this implies
$$-\chi(m) \not\equiv s\chi(k),$$
as desired. So $\chi(k) \equiv 0 \pmod{r}$.
But then
$$(k - 2)\cdot 1 + 2 = k,$$
and
$$(k-2)\chi(1) + \chi(2) + \chi(k) \equiv k\chi(1) + \chi(k) \equiv 0 \pmod{r},$$
contradicting our assumption that there is no zero-sum solution to $\mathcal{E}$.
\end{proof}

We now exhibit a more complicated proof of Theorem~\ref{thm:ufour}, the case $r = 4$. Although the basic structure of the proof is similar to to Theorem~\ref{thm:uprime}, we can no longer use the fact that if $r$ is prime then all numbers are either multiples of $r$ or relatively prime to $r$.

\ufour*
\begin{proof}
We proceed by contradiction. Suppose that there is a function $\chi: \{1, \dots, 4k-5\} \rightarrow \{1,2,3,4\}$ such that there are no 4-zero-sum solutions to $\mathcal{E}$. First we will show that $\chi(1), \chi(2), \chi(3),$ and $\chi(4)$ are all distinct.

Without loss of generality, assume $\chi(2) \equiv 2$. Note that $k-1 \ge 2(r-1)$, so for $0 \le s \le 3$ we have
\begin{align*}
&(k-1 - 2s)\cdot 2 + s \cdot 1 + s \cdot 3  = 2k - 2 \\
&\implies (k-1-2s)\chi(2) + s(\chi(1) + \chi(3)) + \chi(2k-2) \not\equiv 0 \pmod{4}\\
&\implies \chi(2k-2) \not\equiv -(k-1)\chi(2) - s(\chi(1) + \chi(3) - 2\chi(2)) \pmod{4}\\
&\implies \chi(2k-2) \not\equiv 2 - s(\chi(1) + \chi(3)) \pmod{4}.
\end{align*}
If $\chi(1) + \chi(3)$ is relatively prime to $4$, no value can be assigned to $\chi(2k-2)$. So $\chi(1) + \chi(3)$ must be even.
Suppose $\chi(1) + \chi(3) \equiv 2$. Then $\chi(2k - 2)$ is odd, and we have for $s \in \{0,1\}$
\begin{align*}
&(2k-2) + (k-2 - 2s)\cdot 2 + s \cdot 1 + s \cdot 3 = 4k-6 \\
&\implies \chi(2k-2) + (k-2)\chi(2) + s(\chi(1) + \chi(3) - 2\chi(2)) + \chi(4k-6) \not\equiv 0 \pmod{4}\\
&\implies \chi(4k-6) \not\equiv -\chi(2k-2) - 2s \pmod{4}\\
&\implies \chi(4k-6) \text{ is even.}
\end{align*}
Now, again for $s \in \{0,1\}$ we have
\begin{align*}
&2\cdot k + (k - 3 - 2s) \cdot 2 + s \cdot 1 + s \cdot 3 = 4k - 6 \\
&\implies 2\chi(k) + (k - 3)\chi(2) + s(\chi(1) + \chi(3) - 2\chi(2)) + \chi(4k-6) \not\equiv 0 \pmod{4}\\
&\implies 2\chi(k) + 2 + 2s + \chi(4k-6) \not\equiv 0 \pmod{4}.
\end{align*}
But then $2\chi(k)$ must be odd, so this is a contradiction and $\chi(1) + \chi(3) \equiv 2\chi(2) \equiv 0$.

Now assume that $\chi(1)$ is even; that is, $2\chi(1) \equiv 0$. Note that this implies $\chi(3) \equiv \chi(1)$.
We can compute for $0 \le s \le r - 1$
\begin{align*}
&(k-1 - 2s)\cdot 3 + s \cdot 2 + s \cdot 4 = 3k - 3 \\
&\implies \chi(3k-3) + (k-1)\chi(3) + s(\chi(2) + \chi(4) - 2\chi(3)) \not\equiv 0 \pmod{4} \\
&\implies \chi(3k-3) \not\equiv \chi(3) - s(\chi(2) + \chi(4) - 2\chi(3)) \pmod{4} \\
&\implies \chi(3k-3) \not\equiv \chi(3) - s(2 + \chi(4)) \pmod{4}.
\end{align*}
If $\chi(4)$ were odd, then no value could be assigned to $\chi(3k-3)$. Thus $\chi(4)$ is even.
Let $n(\star)$ denote a sequence of values from $1$ to $4$ summing to $n$. Now, for $m \in \{k, k+2, k+4, \dots, 4k - 6\}$, we can write $m$ as a sum of $1,2,3,$ and $4$, with an even number of each except possibly $2$. This is possible because we can assume there are not both $1$'s and $3$'s, and then by parity there must be an even number of whichever is there. Similarly if there are $4$'s we can assume there are no $1$'s. So the only possible bad case has an odd number of $4$'s, and even number of $3$'s, and an even number of $2$'s. If there is at least one $2$, exchange a $4$ and a $2$ for two $3$'s. If there are no $2$'s, then exchange two $3$'s for a $4$ and a $2$. If there are no $2$'s and at most one $3$, then the total sum is at least $4k - 5$, which is larger than we are concerned with.

So, for $m \in \{k, k+2, k+4, \dots, 4k-6\}$, there exist integers $a_i$ such that
$$m = 2a_1 \cdot 1 + 2a_2 \cdot 2 + 2a_3 \cdot 3 + 2a_4 \cdot 4 + 2,$$
which implies
$$\chi(m) + 2a_1\chi(1) + 2a_2\chi(2) + 2a_3\chi(3) + 2a_4\chi(4) + \chi(2) \not\equiv 0 \pmod{4}.$$
Under our current assumptions, the colors of 1, 2, 3, and 4 are all even, and $\chi(2) \equiv 2$.
Hence,
	$$\chi(m) \not\equiv 2 \pmod{4}.$$
Now, for $m \in \{2k - 2, 2k, \dots, 4k - 6\}$, there exist integers $a_i$ such that
$$m = k + 2a_1 \cdot 1 + 2a_2 \cdot 2  + 2a_3 \cdot 3 + 2a_4 \cdot 4.$$
Therefore.
$$\chi(m) + \chi(k) + 2a_1\chi(1) + 2a_2\chi(2) + 2a_3\chi(3) + 2a_4\chi(4) \not\equiv 0 \pmod{4},$$
which under our current assumptions implies
$$\chi(m) \not\equiv -\chi(k) \pmod{4}.$$

Similarly, for $m \in \{3k - 4, 3k - 2, \dots, 4k - 6 \}$, there exist integers $a_i$ such that
$$m = 2 \cdot k + 2a_1 \cdot 1 + 2a_2 \cdot 2 + 2a_3 \cdot 3 + 2a_4 \cdot 4 + 2,$$
which implies
$$\chi(m) \not\equiv -2\chi(k) + 2 \pmod{4}.$$

Finally,
$$4k - 6 = 3\cdot k + (k-4)\cdot 1,$$
so
$$\chi(4k - 6) \not\equiv \chi(k) \pmod{4}.$$

If $\chi(k)$ is odd, no value may be assigned to $\chi(4k - 6)$. So we may assume $\chi(k)$ is even, and therefore $\chi(k) \equiv 0$.
Then for $m \in \{2k - 2, 2k, \dots, 4k - 6\}$, $\chi(m)$ must be odd.
Let $s$ be an even integer less than $k$, and suppose that $\chi(s)$ is odd. Note that $s$ is at least $6$.
Then there exist integers $a_i$ such that
$$4k - 6 = 3\cdot s + 2a_1\cdot 1 + 2a_2\cdot 2 + 2a_3\cdot 3 + 2a_4\cdot 4,$$
which implies
$$\chi(4k - 6) \not\equiv \chi(s) \pmod{4}.$$
On the other hand, there exist integers $b_i$ such that
$$4k - 6 = s + 2b_1\cdot 1 + 2b_2\cdot 2 + 2b_3\cdot 3 + 2b_4\cdot 4,$$
which implies
$$\chi(4k - 6) \not\equiv -\chi(s) \pmod{4}.$$
So $\chi(4k - 6) \not\equiv \pm \chi(s) \pmod{4}.$. Since $\chi(s)$ was assumed to be odd, this means that $\chi(4k - 6)$ must be even, a contradiction. Therefore for all even integers $s$ which are less than $k$, $\chi(s)$ is also even.

Now suppose $t$ is an odd integer less than $k$, and $\chi(t)$ is odd. Note $t \ge 5$. Then there exist integers $a_i$ such that
$$4k - 6 = 3\cdot t + 1 + 2 + 2a_1 \cdot 1 + 2a_2\cdot 2 + 2a_3 \cdot 3 + 2a_4 \cdot 4,$$
which implies that
$$\chi(4k - 6) \not\equiv \chi(t) - \chi(1) + 2\pmod{4}.$$
Similarly, there exist integers $b_i$ such that
$$4k - 6 = t + 1 + 2 +2b_1 \cdot 1 + 2b_2\cdot 2 + 2b_3 \cdot 3 + 2b_4 \cdot 4.$$
Hence,
$$\chi(4k - 6)\not\equiv -\chi(t) - \chi(1) + 2 \pmod{4}.$$
Since $\chi(1)$ is assumed to be even, this shows that $\chi(4k - 6)$ cannot be odd, which is a contradiction.
Thus $\chi(s)$ is even for all integers $s$ less than $k$.

Now suppose $s$ is even, $k < s < 2k - 2$, and $\chi(s)$ is odd. Recall that $\chi(k) \equiv 0$. Let $\sigma = s + k + (k - 4)\cdot 1  + 2$.
Note that $3k - 2 < \sigma < 4k - 4$, and $\sigma$ is even.
We have
$$s + \left(\frac{k}{2} - 2\right)\cdot 1 + \left(\frac{k}{2}\right) \cdot 3 = \sigma.$$
Therefore
$$\chi(s) + \left(\frac{k}{2} - 2\right)\chi(1) + \left(\frac{k}{2}\right)\chi(3) + \chi(\sigma) \not\equiv 0 \pmod{4}.$$
The above expression can be simplified to $\chi(\sigma)\not\equiv -\chi(s) \pmod{4}.$
On the other hand, $\sigma = s + k + (k - 4)\cdot 1  + 2$ implies that
$$\chi(s) + \chi(k)+ (k - 4)\chi(1) + \chi(2) + \chi(\sigma) \not\equiv 0 \pmod{4},$$
which simplifies to $\chi(\sigma) \not\equiv -\chi(s) - \chi(k)$.
But $\chi(k) \equiv 2 $ and $\chi(sigma)$ is odd, so this is impossible.
Similarly, if $s$ is odd, $k < s < 2k - 2$, and $\chi(s)$ is odd, we can define $\sigma = s + k + (k - 3) \cdot 1$.
Then $\sigma$ is even and $3k - 3 < \sigma < 4k - 5$.
We have
$$s + \left(\frac{k}{2} - 1\right)\cdot 1 + \left(\frac{k}{2} - 2\right) \cdot 3 + 2\cdot 2 = \sigma,$$
so
$$\chi(s) +  \left(\frac{k}{2} - 1\right)\chi(1) + \left(\frac{k}{2} - 2\right)\chi(3) + 2\chi(2) + \chi(\sigma) \not\equiv 0 \pmod{4}.$$
Since $\chi(1) \equiv \chi(3),$ this simplifies to $\chi(\sigma) \not\equiv -\chi(s) + \chi(1) + \pmod{4}.$
On the other hand, we can write
$$s + k + (k - 3)\cdot 1 = \sigma,$$
so
$$\chi(s) + \chi(k) + (k-3)\chi(1) + \chi(\sigma) \not\equiv 0 \pmod{4}.$$
This simplifies to $\chi(\sigma) \not\equiv -\chi(s) + \chi(1) + 2 \pmod{4}.$
This is a contradiction since $\chi(\sigma)$ and $\chi(s)$ are both odd, but $\chi(1)$ is even.
Thus $\chi(s)$ is even for $s \le 2k - 3$.
But $\sz{k}{2} = 2k - 3$ (\cite{robertson}, Proposition 3), so there is a $4$-zero-sum solution to $\mathcal{E}$ in the first $2k - 3$ values. This contradicts our assumption that $\chi(1)$ is even, and therefore we may now assume that $\chi(1)$ is odd. Since $-1$ is relatively prime to $4$, zero-sum solutions to $\mathcal{E}$ are invariant under multiplication of $\chi$ by $-1$. So, without loss of generality, we can assume that $\chi(1) \equiv 1$ Then $\chi(3) = 3$. By the same reasoning which showed $\chi(1) + \chi(3) - 2\chi(2)$ to be even,
we can show that $\chi(2) + \chi(4) - 2\chi(3)$ is even.
For integers $s$ between 0 and 3 we have
\begin{align*}
&(k-1 - 2s)\cdot 3 + s \cdot 2 + s \cdot 4  = 3k - 3 \\
&\implies (k-1-2s)\chi(3) + s(\chi(2) + \chi(4)) + \chi(3k - 3) \not\equiv 0 \pmod{4}\\
&\implies \chi(3k-3) \not\equiv -(k-1)\chi(3) - s(\chi(2) + \chi(4) - 2\chi(3)) \pmod{4}\\
&\implies \chi(3k-3) \not\equiv \chi(3) - s(\chi(2) + \chi(4) - 2\chi(3)) \pmod{4}.
\end{align*}
If $\chi(2) + \chi(4) - 2\chi(3)$ were odd, then no value could be assigned to $\chi(3k - 3)$. Therefore $\chi(2) + \chi(4) - 2\chi(3)$ is even, and hence $\chi(4)$ is even.

Suppose $\chi(4) \equiv 2$.
Then for $s \in \{0,1\}$ we have
\begin{align*}
&s \cdot 2 + (2 - 2s) \cdot 3 + (s + k - 3) \cdot 4 = 4k - 6 \\
&\implies s\chi(2) + (2-2s)\chi(3) + (s - 3)\chi(4) + \chi(4k - 6) \not\equiv 0 \pmod{4}\\
&\implies \chi(4k - 6) \not\equiv 2s \pmod{4}.
\end{align*}
Therefore $\chi(4k - 6)$ is odd. We also have
\begin{align*}
&2s \cdot 1 + (k - 1 - 4s) \cdot 2 + s\cdot 2 + s\cdot 4 = 2k - 2 \\
&\implies \chi(2k-2) \not\equiv 2s + 2 \pmod{4}.
\end{align*}
So $\chi(2k - 2)$ is odd as well.
But then
\begin{align*}
&(2k - 2) + 2s\cdot 1 + (k-2 - 3s)\cdot 2 + s\cdot 4 = 4k - 6 \\
&\implies \chi(2k - 2) + \chi(4k - 6) + 2s \not\equiv 0 \pmod{4}.
\end{align*}
Since the left hand side is always even and $s$ ranges from 0 to 1, this is a contradiction. Therefore $\chi(4) \equiv 0 \pmod{4}$.

We have now shown that $\chi(1), \chi(2), \chi(3),$ and $\chi(4)$ are all distinct, and furthermore that without loss of generality $\chi(\alpha) \equiv \alpha \pmod{4}$ for $\alpha \le 4$. The remainder of the proof will derive a contradiction in this case. We willuse the following notation:
\begin{definition}
Let $n(\star)$ denote a sequence of 1's, 2's, 3's, and 4's summing to $n$. Furthermore, when such a $\star$-sequence  appears in an expression of $\mathcal{E}$, the length of the $\star$-sequence  will be exactly long enough that the equation $\mathcal{E}$ has $k-1$ terms on the left hand side.
\end{definition}
Note that the sum of the colors of the $\star$-sequence  is congruent $n \pmod{4}$, and also that the sum of the $\star$-sequence  is at least its length and at most 4 times its length.

Now, for all $m \ge k - 1$, we have
$$m = m(\star).$$
We need to have $m \ge k - 1$ for this because the sequence has length $k - 1$. This implies that $\chi(m) \not\equiv -m \pmod{4}$.
Similarly, for $m \ge 2k - 2$ we have
\begin{align*}
&m = k + (m-k)(\star) \\
&\implies \chi(m) \not\equiv -m - \chi(k) \pmod{4}.
\end{align*}
For $m \ge 3k - 3$ we have
\begin{align*}
&m = 2 \cdot k + (m - 2k)(\star) \\
&\implies \chi(m) \not\equiv -m - 2\chi(k) \pmod{4}.
\end{align*}
Suppose that $\chi(k)$ is even. Then since we know $\chi(k) \not\equiv -k \pmod{4}$, we must have $\chi(k) \equiv 2 \pmod{4}$.
So, for $s \in \{0,1\}$, since $2k - 3 - sk \ge k - 2 - s$ we have
\begin{align*}
&(2k - 2) + s \cdot k + (2k - 3 - sk)(\star) = 4k - 5 \\
&\implies \chi(4k - 5) \not\equiv -\chi(2k - 2) + 2s + 3 \pmod{4}.
\end{align*}
From the above results we know that $\chi(2k - 2) \not\equiv 2, 2 - \chi(k) \pmod{4}$, so $\chi(2k - 2)$ is odd. Similarly, $\chi(4k - 5) \not\equiv 1, 1 - \chi(k) \pmod{4}$, so $\chi(4k - 5)$ must be is even. But that is a contradiction, since the previous calculation shows that $\chi(4k - 5)$ is odd.
Therefore $\chi(k)$ is odd.
For $m \ge 3k - 3$ we have $\chi(m) \not\equiv -m - s\chi(k) \pmod{4}$, where $s \in \{0,1,2\}$. Since $\chi(k)$ is odd, this implies that $\chi(m) \equiv -m + \chi(k) \pmod{4}$ for $m \ge 3k - 3$.

For $2k - 2 \le m \le 3k - 4$ we can compute
\begin{align*}
&m + (4k - 6 - m)(\star) = 4k - 6 \\
&\implies \chi(m) - m + 2 + \chi(4k - 6) \not\equiv 0 \pmod{4}\\
&\implies \chi(m) \not\equiv m - \chi(k) \pmod{4}.
\end{align*}
 For $2k - 2 \le m \le 3k - 5$ we have
 \begin{align*}
 &m + (4k - 7 -m)(\star) = 4k - 7 \\
 &\implies \chi(m) - m + 1 + \chi(4k - 7) \not\equiv 0 \pmod{4}\\
 &\implies \chi(m) \not\equiv m + 3  + (3 - \chi(k)) \pmod{4}\\
 &\implies \chi(m) \not\equiv m + 2 - \chi(k) \pmod{4}.
 \end{align*}
 The following tables prove that for $2k -2 \le m \le 3k - 4$, $\chi(m) \equiv -m + 2 \pmod{4}$ (note that for $m=3k - 4$ we do not need the last relation):

$\chi(k) \equiv 1$:
 \begin{tabular}{c||c|c|c|c}
 $m$ & $-m$ & $-m - \chi(k)$ & $m - \chi(k)$ & $m + 2 - \chi(k)$ \\ \hline \hline
 0 & 0 & 3 & 3 & 1 \\ \hline
 1 & 3 & 2 & 0 & 2 \\ \hline
 2 & 2 & 1 & 1 & 3 \\ \hline
 3 & 1 & 0 & 2 & 0 \\
 \end{tabular}
 \smallskip

 $\chi(k) \equiv 3$:
 \begin{tabular}{c||c|c|c|c}
 $m$ & $-m$ & $-m - \chi(k)$ & $m - \chi(k)$ & $m + 2 - \chi(k)$ \\ \hline \hline
 0 & 0 & 1 & 1 & 3 \\ \hline
 1 & 3 & 0 & 2 & 0 \\ \hline
 2 & 2 & 3 & 3 & 1 \\ \hline
 3 & 1 & 2 & 0 & 2 \\
 \end{tabular}

 By process of elimination, we can see $\chi(m) \equiv -m + 2 \pmod{4}$ for $2k - 2 \le m \le 3k - 4$.
 Finally,
 \begin{align*}
 &(2k - 2) + (k) + (k-3)(\star) = 4k - 5 \\
 &\implies \chi(2k - 2) + \chi(k) + k - 3 + \chi(4k - 5) \not\equiv 0 \pmod{4}\\
 &\implies 0 + \chi(k) + 1 + 1 + \chi(k) \not\equiv 0 \pmod{4}\\
 &\implies 2(\chi(k) + 1) \not\equiv 0 \pmod{4}.
 \end{align*}
 Since $\chi(k)$ is odd, this is a contradiction.
\end{proof}

Finally, we present the upper bound for general $r$. The proof is similar to repeated application of the proof of Theorem~\ref{thm:uprime}.

\ucomp*

\begin{proof}
We will need the following lemma.
\begin{lemma}
\label{psum}
For positive integers $x_i$, $\sum_{i=1}^n (x_i - 1) \le \prod_{i=1}^n x_i$.
\end{lemma}
\begin{proof}
Note for positive integers $a,b$ we have $(a-1)(b-1) \ge -1 \implies a + b - 2 \le ab$. The result follows by induction.
\end{proof}
Suppose for the sake of contradiction that there is an $r$-coloring $\chi$ of the first $kr - \sum_{i=0}^{t-1}(p_i - 1) - 1$ natural numbers which does not admit an $r$-zero-sum solution to $\mathcal{E}$. By the lemma, $kr - \sum_{i=0}^{t-1}(p_i - 1) - 1 \ge kr - r$, and for the first part of the proof we will only need to use numbers up to $kr - r$.

Since we can translate $\chi$ without affecting zero-sum sequence of length $k$, assume without loss of generality that $\chi(2) \equiv 2\chi(1) \pmod{r}$.
First we will show that $\chi(\alpha) \equiv \alpha\chi(1) \pmod{r}$ for all $\alpha \le \lfloor \frac{3r}{8} \rfloor + 1$.
To that end, let $\alpha$ be some element of $\{2,3,\dots, \lfloor\frac{3r}{8}\rfloor \}$. We will show that $\chi(\alpha - 1) + \chi(\alpha + 1) - 2\chi(\alpha) \equiv 0 \pmod{r}$. With a simple induction argument, this implies the above claim.

Let $\nu_0 = r$, and suppose that $\chi(\alpha-1) + \chi(\alpha + 1) - 2\chi(\alpha) \not\equiv 0 \pmod{r}$. Then let $\lambda_0$ be the least positive integer such that $\lambda_0(\chi(\alpha-1) + \chi(\alpha + 1) - 2\chi(\alpha) ) \equiv 0 \pmod{r}$, and let $\nu_1 = \nu_0 / \lambda_0$.
We will use a slightly different definition of a $\star$-sequence  than in the previous proof.
\begin{definition}
Let $n(\star)$ be a sequence summing to $n$ whose colors sum to $n\chi(1) \pmod{\nu_1}$. As before, when a $\star$-sequence  appears in an expression of $\mathcal{E}$, its length will be such that the left hand side of the equation has exactly $k - 1$ terms. We will emphasize that the sum of the colors of the $\star$-sequence  is congruent to $n\chi(1)$ mod $\nu_1$ by calling it a \emph{valid} $\star$-sequence .
\end{definition}

\begin{lemma}
\label{sl1}
If a $\star$-sequence has length $z$, where $z \ge 2\nu_1 - 1$ elements, then its sum can take on any value greater than or equal to $z$.
\end{lemma}
\begin{proof}
Suppose $n \ge z$ and write $n = (z - 2\nu_1 + 1)\cdot 1 + \nu_1\cdot y + p \cdot 2 + (\nu_1 - 1 - p)\cdot 1$, where $y \ge 1$ and $p < \nu_1$. We can compute
\begin{align*}
&(z - 2\nu_1 + 1)\chi(1) + \nu_1\chi(y) + p\chi(2) + (\nu_1 - 1 - p)\chi(1)  \\
&\equiv (z - 2\nu_1 + 1)\chi(1) + \nu_1y\chi(1) + 2p\chi(1) + (\nu_1 - 1 - p)\chi(1)  \pmod{\nu_1} \\
&\equiv n\chi(1) \pmod{\nu_1}.
\end{align*}
\end{proof}

For $m \ge k - 1 + 2(\lambda_0 - 1)(\alpha - 1)$, and for $0 \le s_0 \le \lambda_0 - 1$, we can write
\begin{align*}
&m = (2\lambda_0 - 2 - 2s_0)\cdot \alpha + s_0\cdot (\alpha-1) + s_0 \cdot(\alpha + 1) + (m - 2\alpha\lambda_0 + 2\alpha)(\star) \\
&\implies \chi(m) + m\chi(1) + s_0(\chi(\alpha - 1) + \chi(\alpha + 1) - 2\chi(\alpha)) \not\equiv 0 \pmod{\nu_0} \\
&\implies \chi(m) + m\chi(1) \not\equiv 0 \pmod{\nu_1}.
\end{align*}
If $\nu_1 = 1$, we are done, since no value can be assigned to $\chi(m)$, and it is easy to check that
\begin{align*}
k - 1 + 2(\lambda_0 - 1)(\alpha - 1) &= k - 1 + 2(r - 1)(\alpha - 1) \\
&\le k - 1 + 2(r-1)\left(\frac{3r}{8} - 1\right) \\
&= k - 1 + \frac{3r^2}{4} - 4r - \frac{3r}{4} + 4 \\
&\le \left(\frac{3}{8} + \frac{1}{r}\right)kr - \frac{11r}{4} + 3 \\
&\le kr - r,
\end{align*}
Also, if we choose the minimal $m$, we can choose $\star$-sequence to be all 1's, so we can indeed find a valid $\star$-sequence.
On the other hand, if $\nu_1 \ne 1$, let $h_1$ be the least such $m$ such that $h_1 \equiv -h_1 \pmod{\nu_1}$. Thus $h_1 \le k - 1+ 2(\lambda_0 - 1)(\alpha - 1) + \nu_1 - 1$.
Then $\chi(h_1) - h_1\chi(1) \not\equiv 0 \pmod{\nu_1}$, and let $\lambda_1$ be the least positive integer such that $\lambda_1(\chi(h_1) - h_1\chi(1)) \equiv 0 \pmod{\nu_1}$.

Suppose that for all $j < i$, $\lambda_j, \nu_j,$ and $h_j$ are defined. We will define $\lambda_i, \nu_i$, and $h_i$. First, let $\nu_i = \nu_{i-1}/\lambda_{i-1}$.
Now, for
\begin{align*}
m &\ge \left(\sum_{j=1}^{i-1} (\lambda_j - 1)h_j\right) + (2\lambda_0 - 2)(\alpha) + \left(k - 1 - 2\lambda_0 + 2 - \left(\sum_{j=1}^{i-1}(\lambda_j - 1)\right)\right) \\
&= \left(\sum_{j=1}^{i-1} (\lambda_j - 1)(h_j - 1)\right) + k - 1 + 2(\lambda_0 - 1)(\alpha - 1),
\end{align*}
 we have
\begin{align*}
&m = \left(\sum_{j = 1}^{i-1} s_j\cdot h_j \right) + (2\lambda_0 - 2 - 2s_0) \cdot \alpha + s_0\cdot (\alpha - 1) + s_0\cdot (\alpha + 1) + \left(m - 2\lambda_0\alpha + 2\alpha - \left(\sum_{j = 1}^{i-1} s_jh_j \right)\right)(\star) \\
&\implies \chi(m) + m\chi(1) + \left(\sum_{j = 1}^{i-1} s_j(\chi(h_j) -h_j\chi(1) \right) + s_0(\chi(\alpha - 1) + \chi(\alpha + 1) - 2\chi(\alpha)) \not\equiv 0 \pmod{\nu_0} \\
&\implies \chi(m) + m\chi(1) + \left(\sum_{j = 1}^{i-1} s_j(\chi(h_j) -h_j\chi(1) \right) \not\equiv 0 \pmod{\nu_1}.
\end{align*}
If we let the $s_j$ vary from $0$ to $\lambda_j - 1$ for each $j$, this implies that $\chi(m) + m\chi(1) \not\equiv 0 \pmod{\nu_i}$.
Let $h_i$ be the least such $m$ satisfying $h_i \equiv -h_i \pmod{\nu_i}$. Then $h_i \le \left(\sum_{j=1}^{i-1} (\lambda_j - 1)(h_j - 1)\right) + k - 1 + 2(\lambda_0-1)(\alpha - 1) + \nu_i - 1$, and we have $\chi(h_i) - h_i\chi(1) \not\equiv 0 \pmod{\nu_i}$. Let $\lambda_i$ be the least positive integer such that $\lambda_i(\chi(h_i) - h_i\chi(1)) \equiv 0 \pmod{\nu_i}$.

Note that $\nu_i < \nu_{i-1}$ and $\nu_i \mid \nu_{i-1}$, so eventually we will reach an index $t$ such that $\nu_t = 1$, and this process will terminate.
Then, for
\begin{align*}
m &\ge \left(\sum_{j=1}^{t-1} (\lambda_j - 1)h_j\right) + (2\lambda_0 - 2)(\alpha) + \left(k - 1 - 2\lambda_0 + 2 - \left(\sum_{j=1}^{t-1}(\lambda_j - 1)\right)\right) \\
&= \left(\sum_{j=1}^{t-1} (\lambda_j - 1)(h_j - 1)\right) + k - 1 + 2(\lambda_0 - 1)(\alpha - 1),
\end{align*}
we have
\begin{align*}
&m = \left(\sum_{j = 1}^{t-1} s_j \cdot h_j \right) + (2\lambda_0 - 2 - 2s_0)\cdot \alpha + s_0\cdot(\alpha - 1) + s_0\cdot(\alpha + 1) + \left(m - 2\lambda_0\alpha + 2\alpha - \left(\sum_{j = 1}^{t-1} s_jh_j \right)\right)(\star) \\
&\implies \chi(m) + m\chi(1) + \left(\sum_{j = 1}^{t-1} s_j(\chi(h_j) -h_j\chi(1) \right) + s_0(\chi(\alpha-1) + \chi(\alpha+1) - 2\chi(\alpha)) \not\equiv 0 \pmod{\nu_0} \\
&\implies \chi(m) + m\chi(1) + \left(\sum_{j = 1}^{t-1} s_j(\chi(h_j) -h_j\chi(1) \right) \not\equiv 0 \pmod{\nu_1}.
\end{align*}
If we let each $s_j$ vary from $0$ to $\lambda_j - 1$, this implies that $\chi(m) + m\chi(1) \not\equiv 0 \pmod{\nu_t}$, which is impossible since $\nu_t = 1$.

It is necessary to check that the $\star$-sequences are sufficiently large to apply Lemma~\ref{sl1} and that the minimal $m$ are sufficiently small (smaller than $kr - r$). The worst case for both of these is the index $t$ case with all $s_j$ maximal, so it will suffice to check only that case. First we show that the $\star$-sequence has at least $2\nu_1 - 1$ elements. Recall that we have already dealt with the case of $t = 1$, so assume that $\nu_1 > 1$ and $\lambda_0 > 1$.

Now,
\begin{align*}
&(\nu_1 - 1)\left(\lambda_0 - \frac{3}{2}\right) \ge \frac{1}{2} \\
&\implies \nu_1\left(\lambda_0 - \frac{3}{2}\right) \ge \lambda_0 - 1 \\
&\implies \nu_1\lambda_0 - \lambda_0 - \frac{3}{2}\nu_1 + 1 \ge 0 \\
&\implies 2\nu_1\lambda_0 - 2\lambda_0 + 2 - 3\nu_1 \ge 0 \\
&\implies 2r - 2\lambda_0 + 2 - 3\nu_1 \ge 0 \\
&\implies k - 1 - 2\lambda_0 + 3 - 3\nu_1 \ge 0 \\
&\implies k - 1 - 2\lambda_0 + 2 - \nu_1 \ge 2\nu_1 - 1 \\
&\implies k - 1 - 2\lambda_0 + 2 - \prod_{j=1}^{t-1}\lambda_j \ge 2\nu_1 - 1 \\
&\implies k - 1 - 2\lambda_0 + 2 - \sum_{j=1}^{t-1}(\lambda_j - 1) \ge 2\nu_1 - 1,
\end{align*}
which shows that the $\star$-sequence is long enough to apply Lemma~\ref{sl1}.

It remains to show that
$$\left(\sum_{j=1}^{t-1} (\lambda_j - 1)(h_j - 1)\right) + k - 1 + 2(\lambda_0 - 1)(\alpha - 1) \le kr - r.$$
To that end, let $k = Ar$ and let
$$V_i = \left(\sum_{j=1}^{i-1} (\lambda_j - 1)(h_j - 1)\right) + k - 1 + 2(\lambda_0 - 1)(\alpha - 1).$$
We can compute
\begin{align*}
V_{i+1} &= V_i + (\lambda_i - 1)(h_i - 1) \\
&\le V_i + (\lambda_i - 1)\left(\left(\sum_{j=1}^{i-1}(\lambda_j-1)(h_j -1)\right) + k - 1 + 2(\lambda_0 - 1)(\alpha - 1) + \nu_i - 2 \right) \\
&= V_i + (\lambda_i - 1)(V_i + \nu_i - 2) \\
&= \lambda_iV_i + (\lambda_i\nu_i - \nu_i - 2\lambda_i + 2).
\end{align*}

Now, since $\nu_i = \nu_{i-1} / \lambda_{i-1}$, we can check that $\prod_{j=q}^{t-1}\lambda_j = \nu_q$. Thus we have
\begin{align*}
V_t &\le V_1\nu_1 + \sum_{j=1}^{t-1}\nu_{j+1}(\lambda_j\nu_j - \nu_j - 2\lambda_j + 2) \\
&= V_1\nu_1 + \sum_{j=1}^{t-1}(\nu_j^2 - \nu_j\nu_{j+1} - 2\nu_j + 2\nu_{j+1}) \\
&\le V_1\nu_1 + \sum_{j=1}^{t-1}(\nu_j^2 - \nu_{j+1}^2 - 2\nu_j + 2\nu_{j+1}) \\
&\le V_1\nu_1 + \nu_1^2 - 1 + 2 - 2\nu_1 \\
&= k\nu_1 - \nu_1 + 2\lambda_0\alpha\nu_1 - 2\alpha\nu_1 - 2\lambda_0\nu_1 + 2\nu_1 + (\nu_1 - 1)^2 \\
&= Ar\nu_1 + \nu_1 + 2\alpha r - 2\alpha\nu_1 - 2r + (\nu_1 - 1)^2 \\
&= r(A\nu_1 + 2\alpha - 2) - 2\alpha\nu_1 + \nu_1 + (\nu_1 - 1)^2 \\
&\le r\left(\frac{Ar}{2} + 2\alpha - 2\right) - 2\alpha + \frac{r}{2} + \frac{r^2}{4} - r + 1 \\
&= \left(\frac{2A + 1}{4}\right)r^2 + \left(2\alpha - \frac{5}{2}\right)r - 2\alpha + 1.
\end{align*}
Finally, since $\alpha \le \frac{3r}{8}$ and $A \ge 2$ we have
\begin{align*}
\frac{3}{4}r &\ge 2\alpha - \frac{3}{2} \\
 \protect \frac{2A - 1}{4}r &\ge 2\alpha - \frac{3}{2} \\
 \protect \left(\frac{2A - 1}{4}\right)r^2 &\ge \left(2\alpha - \frac{3}{2}\right)r - 2\alpha + 1 \\
 Ar^2 - r &\ge \left(\frac{2A + 1}{4}\right)r^2 + \left(2\alpha - \frac{5}{2}\right)r - 2\alpha + 1,
\end{align*}
as desired.
Thus $\chi(\alpha - 1) + \chi(\alpha + 1) - 2\chi(\alpha) \equiv 0 \pmod{r}$ for $\alpha \le \lfloor \frac{3r}{8} \rfloor$, and by induction $\chi(\alpha) - \alpha\chi(1) \equiv 0 \pmod{r}$ for $\alpha \le \lfloor \frac{3r}{8} \rfloor + 1$.

For the second part of the proof, we will also need the following four special cases:
\begin{description}
\item[$\mathbf{A = 2, r = 9, \alpha = 4:}$]
In this case we have $Ar^2 - r  = 153$, and  $\left(\frac{2A + 1}{4}\right)r^2 + \left(2\alpha - \frac{5}{2}\right)r - 2\alpha + 1 = 101.25 \le 153$. So $\chi(5) \equiv 5\chi(1) \pmod{r}$ also.

\item[$\mathbf{A = 2, r = 10, \alpha = 4:}$]
In this case we have $Ar^2 - r = 190$, and $\left(\frac{2A + 1}{4}\right)r^2 + \left(2\alpha - \frac{5}{2}\right)r - 2\alpha + 1 = 121 \le 190$. So $\chi(5) \equiv 5\chi(1) \pmod{r}$ also.

\item[$\mathbf{A = 2, r = 6, \alpha = 3:}$]
In this case we have $Ar^2 - r = 66$, and $\left(\frac{2A + 1}{4}\right)r^2 + \left(2\alpha - \frac{5}{2}\right)r - 2\alpha + 1 = 43 \le 66$. So $\chi(4) \equiv 4\chi(1) \pmod{r}$ also.

\item[$\mathbf{A = 2, r = 8, \alpha = 4:}$]
In this case we have $Ar^2 - r = 120$, and $\left(\frac{2A + 1}{4}\right)r^2 + \left(2\alpha - \frac{5}{2}\right)r - 2\alpha + 1 = 85 \le 120$. So $\chi(5) \equiv 5\chi(1) \pmod{r}$ also.
\end{description}

Now we will show that $\chi(k) - k\chi(1) \equiv 0 \pmod{r}$. For the remainder of the proof, we will use a slightly different definition of a $\star$-sequence:

\begin{definition}
Let $n(\star)$ be a sequence summing to $n$ whose colors sum to $n\chi(1) \pmod{r}$. As before, when a $\star$-sequence  appears in an expression of $\mathcal{E}$, its length will be such that the left hand side of the equation has exactly $k - 1$ terms. We will again emphasize that the sum of the colors of the $\star$-sequence  is congruent to $n\chi(1)$ mod $r$ by calling it a \emph{valid} $\star$-sequence .
\end{definition}

\begin{lemma}
\label{sl2}
If a $\star$-sequence has $z \ge r + 4$ elements in it, it can take on any value greater than or equal to $z$.
\end{lemma}

\begin{proof}
A sequence of $l$ elements of $\{1,2,\dots,\lfloor \frac{3}{8} \rfloor + 1\}$ can sum to any of $l\lfloor \frac{3}{8} \rfloor + 1$ distinct values. If $l\lfloor \frac{3}{8} \rfloor + 1 \ge r$, then this sum can attain any value modulo $r$. Since $r \ge 6$, if $l \ge 4$ we have
\begin{align*}
l\left\lfloor \frac{3}{8} \right\rfloor + 1 &\ge 4\left(\frac{3r}{8} - 1\right) + 1 \\
&\ge \frac{3r}{2} - 3 \\
&\ge r + \frac{r}{2} - 3 \\
& \ge r,
\end{align*}
as desired. Then any value $n$ greater than the length $z$ of the $\star$-sequence  can be expressed as $r(y)$ plus the sum of at least $4$ values from the set $\{1,2,\dots,\lfloor \frac{3}{8} \rfloor + 1\}$, where $y$ is some positive integer. Since $r\chi(y) \equiv ry\chi(1) \equiv 0 \pmod{r}$, the sum of the colors of this sequence is indeed $n \pmod{r}$.
\end{proof}

Let $h_0 = k$, $\nu_0 = r$, and suppose that $\chi(h_0) - h_0\chi(1) \not\equiv 0 \pmod{\nu_0}$. Then let $\lambda_0$ be the least positive integer such that $\lambda_0(\chi(h_0) - h_0\chi(1)) \equiv 0 \pmod{\nu_0}$.
Let $\nu_1 = \nu_0 / \lambda_0$.
Now consider for some integers $m$, $s_0$:
\begin{align*}
&m = s_0 \cdot h_0 + (m - s_0h_0)(\star) \\
&\implies \chi(m) + m\chi(1) + s_0(\chi(h_0) - h_0\chi(1)) \not\equiv 0 \pmod{\nu_0}. \\
\end{align*}
If $s_0$ ranges from $0$ to $\lambda_0 - 1$, this implies that
$$\chi(m) + m\chi(1) \not\equiv 0 \pmod{\nu_1}.$$
Furthermore, if $\nu_1 \mid m$, we have $\chi(m) + m\chi(1) \equiv \chi(m) - m\chi(1) \not\equiv 0 \pmod{\nu_1}$.
The least value of $m$ for which we can allow $s_0$ to range from $0$ to $\lambda_0 - 1$ is
$$m = (\lambda_0 - 1)h_0 + (k - \lambda_0) = (\lambda_0 - 1)(h_0 - 1) + k - 1.$$
Therefore there is some $y_1 \le \lambda_0 - 1$ such that if $h_1 = (\lambda_0 - 1)h_0 + (k - \lambda_0) + y_1$, then $\nu_1 \mid h_1$, and we have $\chi(h_1) - h_1\chi(1) \not\equiv 0 \pmod{\nu_1}$.  Let $\lambda_1$ be the least positive integer such that $\lambda_1(\chi(h_1) - h_1\chi(1)) \equiv 0 \pmod{\nu_1}$.

Suppose that for $j < i$, $\lambda_j, \nu_j,$ and $h_j$ have already been defined, and that $\nu_{i-1} \ne 1$. We will define $\lambda_i, \nu_i,$ and $h_i$. First let $\nu_i = \nu_{i - 1} / \lambda_{i - 1}$.
Then for some values of $m$, $s_j$ we have
\begin{align*}
&m = \left(\sum_{j=0}^{i-1} s_j \cdot h_j\right) + \left(m - \left(\sum_{j=0}^{i-1} s_jh_j\right)\right)(\star) \\
&\implies \chi(m) + m\chi(1) + \left( \sum_{j=0}^{i-1} s_j(\chi(h_j) - h_j\chi(1)) \right) \not\equiv 0 \pmod{r}.
\end{align*}
If we allow the $s_j$ to range from $0$ to $\lambda_j - 1$, the expression $\left( \sum_{j=0}^{i-1} s_j(\chi(h_j) - h_j\chi(1)) \right)$ can take on the value of any multiple of $\nu_i \pmod{r}$. Thus we have $\chi(m) + m\chi(1) \not\equiv 0 \pmod{\nu_i}$.

The least value of $m$ for which we can produce a valid $\star$-sequence is
$$m = \left(\sum_{j=0}^{i-1} (\lambda_j - 1)h_j \right) + \left(k - 1 - \sum_{j=0}^{i-1} (\lambda_j - 1)\right) = \left(\sum_{j=0}^{i-1} (\lambda_j - 1)(h_j - 1) \right) + k - 1.$$
(If $m$ is smaller than this, the length of the $\star$-sequence  would be less than its sum.) Thus there is some value $y_i \le \nu_i - 1$, such that if $h_i = \left(\sum_{j=0}^{i-1} (\lambda_j - 1)(h_j - 1) \right) + k - 1 + y_i$, then $\nu_i \mid h_i$, and therefore $\chi(h_i) + h_i\chi(1) \equiv \chi(h_i) - h_i\chi(1) \not\equiv 0 \pmod{\nu_i}$. Then let $\lambda_i$ be the least positive integer such that $\lambda_i(\chi(h_i) - h_i\chi(1)) \equiv 0 \pmod{\nu_i}$.

Note that $\nu_{i} \mid \nu_{i-1}$ and also $\nu_i < \nu_{i-1}$, so there is some index $t$ at which $\nu_t = 1$ and this process terminates. Then for some values of $m,s_j$ we can write
\begin{align*}
&m = \left(\sum_{j=0}^{t-1} s_j \cdot h_j\right) + \left(m - \left(\sum_{j=0}^{t-1} s_jh_j \right)\right)(\star) \\
&\implies \chi(m) + m\chi(1) +  \left(\sum_{j=0}^{t-1} s_j(\chi(h_j) - h_j\chi(1))\right) \not\equiv 0 \pmod{r}. \\
\end{align*}
As before, if each $s_j$ is allowed to range from $0$ to $\lambda_j - 1$, this implies that $\chi(m) + m\chi(1) \not\equiv 0 \pmod{\nu_t}$. But $\nu_t = 1$, so this is impossible. Let $m_t$ be the least value of the above for which it is possible to have a valid $\star$-sequence. We compute
\begin{align*}
m_t &= \left(\sum_{j=0}^{t-1}(\lambda_j - 1)h_j\right) + \left( k - 1 - \sum_{j=0}^{t-1} (\lambda_j - 1) \right) \\
&=  \left(\sum_{j=0}^{t-1}(\lambda_j - 1)(h_j - 1) \right) + k - 1.
\end{align*}
In order to finish the proof, we need to check that $m_t \le kr - \sum_{i=0}^{t-1}(p_i - 1) - 1$, and also check that we can apply Lemma~\ref{sl2} to produce a valid $\star$-sequence. To that end, let
$$V_i = \left(\sum_{j=0}^{i-1}(\lambda_j - 1)(h_j - 1) \right) + k - 1.$$
We can compute
\begin{align*}
V_{i+1} &= V_i + (\lambda_i - 1)(h_i - 1) \\
&= V_i + (\lambda_i - 1)\left(\sum_{j=0}^{i-1} (\lambda_j - 1)(h_j - 1) + k -1 + y_i - 1 \right) \\
&= V_i + (\lambda_i - 1)(V_i + y_i - 1) \\
&= \lambda_iV_i + (\lambda_i - 1)(y_i - 1) \\
&= \lambda_iV_i + (\lambda_iy_i - y_i - \lambda_i + 1).
\end{align*}
Since $\nu_i = \nu_{i-1}/\lambda_{i-1},$ we have $\prod_{j=q}^{t-1}\lambda_j = \nu_q$. Therefore
\begin{align*}
V_t &\le V_0\nu_0 + \sum_{j=1}^{t}\nu_j(\lambda_{j-1}y_{j-1} - y_{j-1} - \lambda_{j-1} + 1) \\
&= kr - r + \sum_{j=1}^{t} (\nu_j\lambda_{j-1}y_{j-1} - \nu_jy_{j-1} - \nu_j\lambda_{j-1} + \nu_j) \\
&= kr - r + \sum_{j=1}^{t} (\nu_{j-1}y_{j-1} - \nu_jy_{j-1} - \nu_{j-1} + \nu_j) \\
&= kr - r + \sum_{j=1}^{t} (\nu_{j-1}y_{j-1} - \nu_jy_{j-1}) - \nu_0 + \nu_t \\
&= kr - r + \sum_{j=1}^{t-1} (\nu_j(y_{j} - y_{j-1})) - y_{t-1} + 1.
\end{align*}
Now observe that $V_i + y_i = h_i$, and that
$$h_i \equiv \lambda_{i-1}(h_{i-1} - y_{i-1}) + (\lambda_{i-1} - 1)(y_{i-1} - 1) + y_i \equiv y_i - y_{i-1} - \lambda_{i-1} + 1 \pmod{\nu_i}.$$
Therefore $y_i - y_{i-1} \equiv \lambda_{i-1} - 1 \pmod{\nu_i}$, and in particular $y_i - y_{i-1} \le \lambda_{i-1} - 1$, and $y_{t-1} \le 1 + \sum_{j=0}^{t-2} (\lambda_j - 1)$.
This allows us to finish the above calculation:
\begin{align*}
&= kr - r + \sum_{j=1}^{t-1} (\nu_j(y_{j} - y_{j-1})) - y_{t-1} + 1 \\
&\le kr - r + \sum_{j=1}^{t-1} (\nu_j(\lambda_{j-1} - 1)) - \sum_{j=0}^{t-2} (\lambda_j - 1)\\
&= kr - r + \sum_{j=1}^{t-1} (\nu_{j-1}- \nu_j) - \sum_{j=0}^{t-2} (\lambda_j - 1) \\
&= kr - \nu_{t-1}  - \sum_{j=0}^{t-2} (\lambda_j - 1) \\
&= kr -  \sum_{j=0}^{t-1} (\lambda_j - 1) - 1.
\end{align*}
By Lemma~\ref{psum}, this value is at most $kr - \sum_{i=0}^{t-1}(p_i - 1) - 1$, as desired.

We also must check that the length of the star sequence is always at least $r + 4$, so that we can apply Lemma~\ref{sl2} and show that there is a valid $\star$-sequence.
In the worst case, all of the $s_j$ attain their maximum value, $\lambda_j - 1$. Then the $\star$-sequence has length
\begin{align*}
&k - 1 - \sum_{j=0}^{t-1}(\lambda_j - 1) \\
\ge &2r - 1 - \sum_{j=0}^{t-1}(\lambda_j - 1)\nu.
\end{align*}
Thus we need to show
$$\sum_{j=0}^{t-1}(\lambda_j - 1) \le r - 5.$$
In fact, this is not always true. We divide into $2$ cases:
\begin{description}
   \item[Case 1: $t = 1$.]
   We must show that it is possible to write $m = s_0k + (m - s_0k)(\star)$ for $0 \le s_0 \le r - 1$ for some
   $m \le kr - r$ (since $t = 1 \implies V_t = kr - r$). In fact, we will take $m$ to be $kr - r$.
   First note that the value of the $\star$-sequence is always at least its length, since in the worst case
   ($s_0 = \lambda_0 - 1$) the length of the $\star$-sequence  is $k - r$, and its value is $kr - r - (kr - k)= k - r$.
   Suppose $k \ge 3r$.
   Then the length of the $\star$-sequence is at least $2r \ge r+4$, so we can apply the lemma
   and the $\star$-sequence  is always valid.
   On the other hand, if $k = 2r$, the star-sequence is not always long enough to apply the lemma. The length
   of the $\star$-sequence  is equal to $k - 1 - s_0 = 2r - 1 - s_0$, so when $r - 4 \le s_0 \le r - 1$ we must find a valid $\star$-sequence.
   \begin{itemize}
   	\item The case $s_0 = r - 1$ is easy since we can take the sequence of all 1's.
	\item If $s_0 = r - 2$, we must find $r + 1$ elements summing to $2k - r = 3r$. Since $r \ge 6$, we have
 	$3 \ge \lfloor \frac{3r}{8} 	\rfloor + 1$, so we can just take $r - 1$ 3's, one 2, and one 1.
 	 \item If $s_0 = r - 3$, we must find $r + 2$ elements summing to $3k - r = 5r$. If $r = 6$ or $8$,
	 then note that $(\lfloor \frac{3}{8} 	\rfloor + 1)(r + 2) \ge 5r$, so this is possible. If $r \ge 12$, note that
	 $\left(\frac{3}{8}r\right)(r + 2) \ge 5r$, so this is again possible. We will ignore the cases $r = 7$
	 and $r = 11$ since they are solved by the previous theorem on primes.
	 In the cases $r = 9, r=10$, we can use our special cases from the first part of the proof, and since
	 $5(r+2) \ge 5r$, it will be possible to write $5r$ as the sum of $r+2$ numbers, each at most $5$.
 	 \item If $s_0 = r - 4$, we must find $r + 3$ elements summing to $4k - r = 7r$. Take $r$ copies of $6$,
 	  and then find $3$ elements which are at most $\lfloor \frac{3r}{8} 	\rfloor + 1$ that sum to $r$.
	  It is easy to check that this is always possible when $r \ge 6$.
   \end{itemize}
   \item[Case 2: $t \ge 2$.]
   By a previous lemma,
   $\sum_{j=0}^{t-1}(\lambda_j - 1) \le \lambda_0 - 1 + \frac{r}{\lambda_0}$. But since $t \ge 2$,
   $\lambda_0 < r$ implies  $2 \le \lambda_0 \le \frac{r}{2}$. By convexity $\lambda_0 - 1 + \frac{r}{\lambda_0}$
   is maximized at the extremes $\lambda_0 = 2$ and $\lambda_0 = \frac{r}{2}$. In these cases we have
   $\lambda_0 - 1 + \frac{r}{\lambda_0} = \frac{r}{2} + 1$. If $r \ge 12$, we are done, since $\frac{r}{2} + 1 \le r - 5$. As in the $t = 1$ case, if
   $k \ge 3r$, we are done. Also as in the $t = 1$ case, we will ignore $r = 7, r = 11$ since they are solved by a
   previous theorem. So we have 4 subcases:
   \begin{itemize}
   	\item The case $r = 6$. Then $t = 2$ and $\{\lambda_0, \lambda_1\} = \{2,3\}$ in some order.
	Then the $\star$-sequence  has at least $11 - 2 - 1 = 8$ elements in it. Since for all $\alpha \le 4$, we have
	$\chi(\alpha) \equiv \alpha\chi(1) \pmod{r}$, the proof of Lemma~\ref{sl2} can be modified
	to only require a $\star$-sequence  of length $r + \lceil\frac{r - 1}{3}\rceil = 8$ elements.
	\item The case $r = 8$. Similarly to the $r = 6$ case, at worst we have $15 - 3 - 2 = 10$ elements in
	the $\star$-sequence. As before we can modify the proof of Lemma~\ref{sl2} to only require a
	a length of $r +  \lceil\frac{r - 1}{4}\rceil = 10$ elements.
	\item The case $r = 9$. Similarly to the previous cases, we can check that
	the $\star$-sequence  has length at least $17 - 2 - 2 = 13 \ge r + 4$, so Lemma~\ref{sl2} applies.
	\item The case $r = 10$. Similarly to the previous cases, we can check that
	the $\star$-sequence  has length at least $19 - 4 - 1 = 14 \ge r + 4$, so Lemma~\ref{sl2} applies.
   \end{itemize}
\end{description}

The above cases show that we can always find a valid $\star$-sequence  with the desired length and sum, which completes the proof that there is a contradiction unless $\chi(k) - k\chi(1) \equiv 0 \pmod{r}$. Of course, we also have
$$(k-2)\cdot 1 + 2 = k,$$
so
$$(k-2)\chi(1) + \chi(2) + \chi(k) \not\equiv 0 \pmod{r}.$$
Since $\chi(2) \equiv 2\chi(1) \pmod{r}$, this leads to a contradiction immediately, and the proof is complete.

\end{proof}

\section{Lower Bounds}
Here we present two shorter proofs of lower bounds on $\sz{k}{r}$. Recall the statement of Theorem~\ref{thm:lodd}.

\lodd*

\begin{proof}
We will show how to construct a coloring $\chi : \{1,2,\dots,kr-r-1\} \longrightarrow \mathbb{Z} / r\mathbb{Z}$ with no $r$-zero-sum solution to $\mathcal{E}$.
The coloring will have the following properties for $1 \le \alpha \le r$:
\begin{itemize}
\item For $m \le \alpha k  - \alpha, \chi(m) \in \{m, m + 2, m + 4, \dots, m + 2(\alpha- 1)\}.$
\item For $m \ge \alpha k - \alpha, \chi(m) \not\in \{-m, -m - 2, -m - 4, \dots, -m - 2(\alpha - 1) \}.$
\end{itemize}
Suppose there is such a coloring, and that $\sum_{i=1}^{k-1} x_i = x_k$. Suppose the sequence $x_1, \dots, x_{k-1}$ contains $b_\alpha$ elements $x_i$ such that $(\alpha-1)k - (\alpha - 1) < x_i \le \alpha k - \alpha$.
Then $\sum_{i=1}^{k-1} \chi(x_i) \equiv x_k + 2\gamma \pmod{r}$, where $\gamma$ is some integer such that $0 \le \gamma \le \sum_{\alpha=1}^r (\alpha - 1)b_\alpha$.

Furthermore, $x_k \ge k - 1 + \sum_{\alpha=1}^r b_\alpha (\alpha - 1)(k - 1) = \left(1 + \sum_{\alpha=1}^r (\alpha - 1)b_\alpha \right)(k - 1)$. Thus $\chi(x_k) \not\equiv -x_k - 2\gamma'$ for any $0 \le \gamma' \le \sum_{\alpha=1}^r (\alpha - 1)b_\alpha$.

Suppose for the sake of contradiction that $\chi(x_k) + x_k + 2\gamma \equiv 0 \pmod{r}$. Then $\chi(x_k) \equiv -x_k - 2\gamma \pmod{r}$. But this is impossible since $\chi(x_k) \not\equiv -x_k - 2\gamma'$, and the bounds on $\gamma$ and $\gamma'$ are the same.

Now we will show that such a coloring exists. If $m \ne \alpha k - \alpha$ for some $\alpha$, then the set of allowed colors of $m$ is larger than the set of disallowed colors, so we can simply pick one of the allowed colors. Note that this uses the fact that $\alpha \le r$.
On the other hand, if $m = \alpha k - \alpha$, the sets of permitted and forbidden colors are the same size. We must show that they are not equal for $\alpha < r$.
Suppose for the sake of contradiction that
$$\{-\alpha, -\alpha + 2, -\alpha + 4, \dots, -\alpha + 2(\alpha - 1) \} \equiv \{\alpha, \alpha - 2, \alpha - 4, \dots, \alpha - 2(\alpha -1) \} \pmod{r}.$$
Since $\alpha < r$, both of these sets have at most $r$ elements in them, and the elements all differ by $2$'s. So, if the two sets are the same, it must be the case that $-\alpha \equiv \alpha - 2(\alpha - 1) \pmod{r}$.
But that implies $0 \equiv 2 \pmod{r}$, which is a contradiction. Therefore $\sz{k}{r} > kr - r - 1$.
\end{proof}

There is a similar construction when $r$ is even, but it is no longer useful to use sequences with common difference two.

\leven*

\begin{proof}
Again we will show how to construct a coloring $\chi: \{1, 2, \dots, kr - r - 2 \} \longrightarrow \mathbb{Z}/r\mathbb{Z}$ with no $r$-zero-sum solution to $\mathcal{E}$. The coloring will have the following properties for $1 \le \alpha \le r - 2$:
\begin{itemize}
\item For $m \le \alpha k - \alpha, \chi(m) \in \{m, m + 1, m + 2, \dots, m + (\alpha - 1) \}$.
\item For $m \ge \alpha k - \alpha, \chi(m) \not\in \{-m, -m - 1, -m - 2, \dots, -m - (\alpha - 1) \}$.
\end{itemize}
Additionally, we have the following properties:
\begin{itemize}
\item For $m \le (r-1)k - (r - 1) - 1, \chi(m) \in \{m, m+1, m+2, \dots, m + (r- 2) \}$.
\item For $m \ge (r-1)k - (r-1), \chi(m) \not\in \{-m, -m - 1, -m -2, \dots, -m - (r - 2) \}$.
\end{itemize}
First we show that these properties are sufficient. Suppose for the sake of contradiction that $\chi$ satisfies the above properties and that $x_1, \dots , x_k$ is an $r$-zero-sum solution to $\mathcal{E}$. As before, for $1 \le \alpha \le r - 2$, let $b_\alpha$ be the number of elements of $x_1, \dots, x_{k-1}$ such that $(\alpha - 1)k  - (\alpha - 1) < x_i \le \alpha k - \alpha$. Additionally, let $b_{r-1}$ be the number of $x_i$ such that $(r-2)k - (r-2) < x_i \le (r-1)k - (r-1) - 1$. Note that none of $x_1, \dots, x_{k-1}$ can be be greater than or equal to $(r-1)k - (r-1)$, or $x_k$ would exceed $kr - r - 2$.

Now, $\sum_{i=1}^{k-1}\chi(x_i) \equiv x_k + \gamma$, where $\gamma$ is some integer such that $0 \le \gamma \le \sum_{\alpha=1}^{r-1}(\alpha - 1)b_\alpha$.

Furthermore, $x_k \ge k - 1 + \sum_{\alpha = 1}^{r-1}b_\alpha(\alpha - 1)(k - 1) = (1 + \sum_{\alpha=1}^{r-1} (\alpha - 1)b_\alpha)(k-1)$. Thus $\chi(x_k) \not\equiv -x_k - \gamma' \pmod{r}$, where $0 \le \gamma' \le \sum_{\alpha=1}^{r-1}(\alpha - 1)b_\alpha$. Suppose that $\chi(x_k) + x_k + \gamma \equiv 0 \pmod{r}$. Then $\chi(x_k) \equiv -x_k - \gamma \pmod{r}$. But that is impossible since $\chi(x_k) \not\equiv -x_k - \gamma'$, and $\gamma'$ has the same bounds as  $\gamma$.

Now we show that such a coloring exists. As in the previous proof, the set of permitted colors is larger than the set of forbidden colors except when $m = \alpha k - \alpha$ for some $\alpha \le r - 2$. Suppose for some such $\alpha$ the sets of permitted and forbidden colors are the same $\pmod{r}$. That is, suppose
$$\{-\alpha, -\alpha + 1, -\alpha + 2, \dots, -\alpha + (\alpha - 1) \} \equiv \{\alpha, \alpha - 1, \alpha - 2, \dots, \alpha - (\alpha - 1)\}. $$
Then $-\alpha \equiv \alpha - (\alpha - 1) \implies \alpha \equiv -1 \pmod{r}$. But that is impossible since $\alpha < r - 1$. Therefore $\sz{k}{r} > kr - r - 2$.
\end{proof}

\begin{comment}
\begin{theorem}
Suppose $r$ is odd, $r = \prod_{i=0}^{t-1}\lambda_t$, and $\sum_{i=0}^{t-2} (\lambda_i - 1) \le \lambda_{t-1} - 2$. Then $\sz{k}{r} \ge kr - \sum_{i=0}^{t-1} (\lambda_i - 1) - 1$.
\end{theorem}

\begin{proof}
Let $\nu_i = \prod_{j=i}^{t-1} \lambda_j$, and let $h_i = k + \sum_{j=0}^{i-1}h_j(\lambda_j -1)$
We will construct an r-coloring $\chi$ with the following properties:
\begin{itemize}
\item For $m \ge \alpha (h_i - 1) - \sum_{j=0}^{i-1}(\lambda_j - 1), \chi(m) \not\in \{-m, -m - 2c_i\nu_{i+1}, \dots, -m - 2\alpha c_i \nu_{i+1}\} \pmod{\nu_i}.$ This is called the ``forbidden set''.
\item For $m \le (\alpha + 1)(h_i - 1), \chi(m) \in \{m, m+2c_i\nu_{i+1},\dots, m + 2\alpha c_i \nu_{i+1} \}\pmod{r}$. This is called the ``permitted set''.
\end{itemize}
First we will show that such a coloring is possible. Suppose that $m = (\alpha+1)(h_i - 1) - z_i,$ where $0 \le z_i \le \sum_{j=0}^{i-1}(\lambda_j - 1)$ (if $m$ is not such a number, then the forbidden set is smaller than the permitted set, so we can ignore these cases).
Suppose furthermore that the permitted set is exactly equal to the forbidden set. Then we have
\begin{align*}
&-m \equiv m + 2\alpha c_i \nu_{i+1} \pmod{\nu_i} \\
&\implies 2m + 2\alpha c_i \nu_{i+1} \equiv 0 \pmod{\nu_i} \\
&\implies -2\alpha - 2z_i - 2+ 2\alpha c_i \nu_{i+1} \equiv 0 \pmod{\nu_i} \\
&\implies -\alpha - z_i - 1 + \alpha c_i \nu_{i+1} \equiv 0 \pmod{\nu_i}.
\end{align*}
If $\nu_{i+1}$ is relatively prime to $\lambda_i$, then we can let $c_i \equiv \nu_{i+1}^{-1} \pmod{\lambda_i}$, and the above expression simplifies to $z_i + 1 \equiv 0 \pmod{\nu_i}$, which is impossible. On the other hand, suppose that $d = \gcd(\nu_{i+1},\lambda_i) > 1$. Let $c_i = \nu_{i+1}^{-1} \pmod{\lambda_i / d}$. Then the above expression simplifies to $-\alpha - z_i - 1 + d\alpha \equiv 0 \pmod{\nu_i}$.

Now suppose there exist $x_i$ such that $\sum_{i=1}^{k-1} x_i = x_k$, and $\sum_{i=1}^{k} \chi(x_i) - x_i \equiv -2x_k \pmod{r}$.
\end{proof}
\end{comment}

\section{Conclusion and Remaining Questions}
The above theorems show that $\sz{k}{r} = kr - r$ whenever $r$ is an odd prime and $k > r$. Additionally, we have shown that $\sz{k}{4} = 4k - 5$ when $k > 4$, so Robertson's first two questions have been answered.
Robertson's fourth question, regarding the order of $\sz{k}{k}$ still remains unresolved.
Additionally we ask the following questions:
\begin{itemize}
\item Is the bound given by the summation in Theorem 3 always tight?
\item For most objects in Ramsey Theory, it seems very difficult to find upper and lower bounds which are close to each other. On the other hand, it appears to be much easier to find close bounds on the zero-sum Schur numbers than on the ordinary Schur numbers. Similar zero-sum variants can be defined for many other objects of Ramsey Theory. What more can be said about the zero-sum analogues of\dots
\begin{itemize}
\item Ramsey Numbers?
\item Van der Waerden Numbers? (see~\cite{robertsonvdw})
\item Rado Numbers? (see~\cite{brown})
\end{itemize}
\end{itemize}

\section{Acknowledgements}
This work was conducted at the 2018 Duluth REU. The author would like to thank Joe Gallian for organizing the REU and suggesting the problem, as well the advisors Levent Alpoge, Aaron Berger, and Colin Defant for their help and support. Additionally, the author would like to thank Mitchell Lee for his insightful comments. The Duluth REU is supported by NSF/DMS grant 1650947 and NSAgrant H98230-18-1-0010, and by the University of Minnesota Duluth.