1 Introduction

Algebraic combinatorics is an area of mathematics that employs methods of abstract algebra in various combinatorial contexts and vice versa. One of the fastest developing branches of algebraic combinatorics is combinatorial commutative algebra. It has evolved into one of the most active and vibrant branches of mathematical research during the past several decades. Here, we deal with the edge ideals and edge rings of graphs, which is one of the widely studied topics in combinatorial commutative algebra. The edge ideals were first introduced by Villarreal in his 1990 paper [20]. A while after, Simis et al. [15] obtained more properties of the edge ideals. After then, many authors have been interested in using the edge ideal construction to build a dictionary between graph theory and commutative algebra. We refer the reader to the book by Villarreal [21] for more references and information on the subject. Now, let us recall the notions of edge ideals and edge rings of graphs. Let \({\mathbb {K}}\) be a field and \(R= {\mathbb {K}}[x_0,\ldots ,x_{n-1}]\) be the polynomial ring in n variables over the field \({\mathbb {K}}\). Let G be a finite undirected graph without loops or multiple edges with the vertex set \(V(G)=\{0,\ldots ,n-1\}\) and the edge set E(G). One can associate a square-free quadratic monomial ideal

$$\begin{aligned} I(G)={\big (} x_ix_j\mid \{i,j\}\in E(G){\big )} \end{aligned}$$

of R to the graph G. The ideal I(G) is called the edge ideal of G in R. It is an algebraic object whose invariants can be related to the properties of G and vice versa. The graph G is called Cohen–Macaulay over \({\mathbb {K}}\) (resp. Buchsbaum over \({\mathbb {K}}\), Gorenstein over \({\mathbb {K}}\)) if the ring R/I(G) is Cohen–Macaulay (resp. Buchsbaum, Gorenstein). In the above-mentioned notions, one can simply omit “over \({\mathbb {K}}\)” if either there is no ambiguity or they are independent of the base field. There are many results in the literature concerning when a given graph is Cohen–Macaulay, Buchsbaum, Gorenstein, etc. In particular, it is a wide open problem to characterize graph-theoretically the Gorenstein graphs. This problem is considered for the certain classes of graphs such as bipartite graphs [7], chordal graphs [8] and triangle-free graphs [10]. Generally, we cannot read off the Gorenstein property of a graph just from its structure because this property in fact depends on the characteristic of the base field \({\mathbb {K}}\) (see [10, Proposition 2.1]).

For continuation of the above-mentioned research we may consider circulant graphs. There are large classes of circulant graphs. For instance, cycle graphs, complete graphs, crown graphs and Möbius ladder graphs are circulant graphs. The term circulant comes from the structure of the adjacency matrices of these graphs. Indeed, a matrix is circulant if each of its row is a cyclic shift of the previous one by one position to the left. Circulant matrices have been employed for designing binary codes [12] and circulant graphs are interesting for their role in the design of networks. In 2009, Brown and Hoshino [2] computed the independence polynomials of some circulant graphs and included an application of this computation to music. The importance of circulant graphs, from the viewpoint of Cohen–Macaulayness, Buchsbaumness and Gorensteinness, lies in the fact that these graphs have many triangles. However, we do not know whether the above-mentioned algebraic properties of circulant graphs depend on the base field or not; for triangle-free graphs, Gorenstein property is independent of the base field (see [10, Theorem 4.4]). Recently, the well-coveredness and Cohen–Macaulayness of some classes of circulant graphs were studied (see [1,2,3, 5, 11, 13, 14, 17, 19]). Let us explain a bit in more detail. For instance, Brown and Hoshino [3] have classified some classes of well-covered circulant graphs, and then, Vander Meulen, Van Tuyl and Watt [19] have refined the work of Brown and Hoshino by determining which of these well-covered circulant graphs are also Cohen–Macaulay (see [19, Theorems 3.4 and 5.2]). They have also introduced a class included Cohen–Macaulay circulant graphs which are in fact vertex-decomposable and shellable, and, two classes of circulant graphs which are not Cohen–Macaulay, but they are Buchsbaum (see [19, Theorem 3.7]). They also have classified which cubic circulant graphs are Cohen–Macaulay (see [19, Theorem 5.5]).

In this paper, a similar study is carried out for another class of circulant graphs and their complements. We characterize when these graphs are well-covered, Cohen–Macaulay, Buchsbaum or Gorenstein.

2 Preliminaries

In this section, we recall some preliminaries from graph theory and combinatorial commutative algebra for later use. We refer the readers for definitions, motivation and terminology in commutative algebra to the book by Bruns and Herzog [4]. Also, for any undefined terms in graph theory and combinatorial commutative algebra, we refer the readers to the books by West [22] and Stanley [16].

2.1 Preliminaries from graph theory

Throughout this paper, by a graph, we mean a finite undirected graph without loops or multiple edges. For a graph G, let V(G) denote the set of vertices of G, and let E(G) denote the set of edges of G. An edge \(e\in E(G)\) connecting two vertices x and y will also be written as \(\{x,y\}\). The complement of G, denoted by \({\overline{G}}\), is the graph on the same vertices as G such that \(\{x,y\}\in E\big ({\overline{G}}\big )\) if and only if \(\{x,y\}\notin E(G)\). The neighborhood of a vertex x in G is the set

$$\begin{aligned} N_G(x)=\big \{y\in V(G)\mid \{x,y\}\in E(G)\big \}, \end{aligned}$$

and the closed neighborhood of x in G is the set \(N_G[x]=N_G(x)\cup \{x\}\). The number \(\deg _G(x)= |N_G(x)|\) is called the degree of x in G. (As usual, for a given finite set X, the number of elements of X is denoted by |X|.) It is well-known that

$$\begin{aligned} \sum _{x\in V(G)}\deg _G(x)=2|E(G)|. \end{aligned}$$

A path between two vertices x and y of G is a sequence \(x=v_0,v_1,\ldots ,v_k=y\) of no repeated vertices of G such that for every \(1\le i\le k\), \(\{v_{i-1},v_i \}\in E(G)\). If for any two vertices x and y of G, there is a path between x and y, then G is called connected. An independent set in G is a set of vertices no two of which are adjacent to each other. An independent set in G is maximal (with respect to set inclusion) if the set cannot be extended to a larger independent set. The size of the largest independent set in G, denoted by \(\alpha (G)\), is called the independence number of G. If all maximal independent sets in G have the same size, then G is called well-covered.

For a given integer \(k\ge 2\), a k-partite graph is one whose vertex set is partitioned into k disjoint nonempty subsets in such a way that the two end vertices for each edge lie in distinct partitions. Among k-partite graphs, a complete k-partite graph is one in which each vertex is joined to every vertex that is not in the same partition.

For two graphs G and H, their categorical product, denoted by \(G \times H\), is the graph whose vertex set is \(V(G)\times V(H)\), and two distinct vertices (gh) and \((g',h')\) are adjacent in \(G\times H\) if and only if \(\{g, g'\}\in E(G)\) and \(\{h,h'\}\in E(H)\). The following lemma is useful in the sequel.

Lemma 2.1

Let G and H be two graphs without isolated vertices. If I (resp. J) is a maximal independent set in G (resp. H), then \(I\times V(H)\) (resp. \(V(G)\times J\)) is a maximal independent set in \(G\times H\).

Proof

It is easy to see that \(I\times V(H)\) is an independent set in \(G\times H\). Suppose, on the contrary, that it is not a maximal one. Hence, there exists \((a,b) \notin I\times V(H)\) such that \((I\times V(H))\cup \{(a,b)\}\) is still an independent set in \(G\times H\). Since \(a\notin I\) and I is a maximal independent set in G, there is \(a_1\in I\) such that \(\{a,a_1\}\in E(G)\). Because H does not contain isolated vertices, so there exists an edge \(\{b, b_1\}\in E(H)\). Thus, (ab) is adjacent to \((a_1,b_1)\) in \(G\times H\), which contradicts that \((I\times V(H))\cup \{(a,b)\}\) is an independent set in \(G \times H\). Therefore, \(I\times V(H)\) is a maximal independent set in \(G\times H\). \(\square \)

2.2 Preliminaries from combinatorial commutative algebra

Let n be a positive integer and set \([n]=\{0,\ldots ,n-1\}\). A simplicial complex \(\Delta \) on [n] is a collection of subsets of [n] such that (1) for all \(i\in [n]\), \(\{i\}\in \Delta \), and, (2) \(\Delta \) is closed under taking subsets, that is, if \(F \in \Delta \) and \(F' \subseteq F\), then also \(F' \in \Delta \). Every element \(F\in \Delta \) is called a face of \(\Delta \) and the dimension of a face F is defined to be \(|F|-1\). The dimension of \(\Delta \) which is denoted by \(\dim \Delta \), is defined to be \(d-1\), where \(d =\max \{|F|\mid F\in \Delta \}\). A facet of \(\Delta \) is a maximal face of \(\Delta \) with respect to inclusion. Let \({\mathcal {F}}(\Delta )\) denote the set of facets of \(\Delta \). It is clear that \({\mathcal {F}}(\Delta )\) determines \(\Delta \). When \({\mathcal {F}}(\Delta )=\{F_1,\ldots ,F_m\}\), we write \(\Delta =\langle F_1, \ldots ,F_m\rangle \). We say that \(\Delta \) is pure if all facets of \(\Delta \) have the same cardinality. A nonface of \(\Delta \) is a subset F of [n] with \(F\notin \Delta \). We denote the set of minimal nonfaces of \(\Delta \) with respect to inclusion by \({\mathcal {N}}(\Delta )\). The simplicial complex \(\Delta ^{(i)}=\{F\in \Delta \mid \dim F \le i\}\) is called the i-skeleton of \(\Delta \). The 1-skeleton \(\Delta ^{(1)}\) of \(\Delta \) is a graph and \(\Delta \) is called connected when the graph \(\Delta ^{(1)}\) is connected. We say that \(\Delta \) is shellable if its facets can be arranged in linear order \(F_1,F_2,\ldots ,F_t\) in such a way that the subcomplex \(\langle F_1, \ldots ,F_{k-1}\rangle \cap \langle F_k\rangle \) is pure and has dimension \(\dim F_k-1\) for every k with \(2\le k\le t\). The deletion, link and star of a face \(F\in \Delta \), denoted by \({\hbox {del}_{ \Delta }}(F)\), \({\hbox {lk}_{\Delta }}(F)\) and \({\hbox {st}_{\Delta }}(F)\), respectively, are the simplicial complexes

$$\begin{aligned} {\hbox {del}_{\Delta }}(F)&= \big \{G\subseteq [n] {\setminus } F\mid G \in \Delta \big \}, \\ {\hbox {lk}_{\Delta }}(F)&= \big \{G\in \Delta \mid G\cup F\in \Delta ,\ G \cap F=\emptyset \big \}\ \mathrm{and} \\ {\hbox {st}_{\Delta }}(F)&= \big \{G\in \Delta \mid G\cup F\in \Delta \big \}. \end{aligned}$$

For a vertex \(i\in [n]\), we write \(\mathrm{del}_{\Delta }(i)\), \(\mathrm{lk}_{\Delta } (i)\) and \(\mathrm{st}_{\Delta }(i) \) instead of \(\mathrm{del}_{\Delta }(\{i \})\), \(\mathrm{lk}_{\Delta }(\{i\})\) and \(\mathrm{st}_{\Delta }(\{i\})\), respectively. We say that \(\Delta \) is vertex-decomposable if either \(\Delta \) is a simplex, or there exists a vertex i such that \({\hbox {del}_{\Delta }}(i)\) and \({\hbox {lk}_{\Delta }}(i) \) are vertex-decomposable and every facet of \({\hbox {del}_ {\Delta }}(i)\) is a facet of \(\Delta \). The restriction of \(\Delta \) to a subset \(G\subseteq [n] \) is \(\Delta _G=\{F\in \Delta \mid F \subseteq G\}\). If \(G=\{i\in [n]\mid \mathrm{st} _{\Delta }(i)\ne \Delta \}\), then the core of \(\Delta \) is \(\mathrm{core}( \Delta )=\Delta _G\). If \(\Delta =\mathrm{st}_{\Delta }(i)\) for some vertex i, then \(\Delta \) is a cone over i. Thus, \(\Delta =\mathrm{core}(\Delta )\) means that \(\Delta \) is not a cone. For two simplicial complexes \(\Delta _1\) and \(\Delta _2\) on disjoint vertex sets \(V_1\) and \(V_2\), respectively, the join \(\Delta _1 *\Delta _2\) is the simplicial complex on the vertex set \(V_1\cup V_2\) with faces \(F_1\cup F_2\), where \(F_1\in \Delta _1\) and \(F_2\in \Delta _2\).

Let \({\mathbb {K}}\) be a field and \(R={\mathbb {K}}[x_0,\ldots ,x_{n-1}]\) be the polynomial ring in n variables over the field \({\mathbb {K}}\). Let \(\Delta \) be a simplicial complex on [n]. For every subset \(F\subseteq [n]\), we set \({ x}_F=\prod _{i\in F}x_i\). The Stanley–Reisner ideal of \(\Delta \) is the ideal \(I_{\Delta }\) of R which is generated by those square-free monomials \(x_F\) with \(F\notin \Delta \). In other words,

$$\begin{aligned} I_{\Delta }={\big (}x_F\mid F\in {\mathcal {N}}(\Delta ){\big )}. \end{aligned}$$

The Stanley–Reisner ring of \(\Delta \), denoted by \({\mathbb {K}}[\Delta ]\), is defined to be \({\mathbb {K}}[\Delta ]=R/I_ {\Delta }\). The simplicial complex \(\Delta \) is called Cohen–Macaulay over \({\mathbb {K}}\) (resp. Buchsbaum over \({\mathbb {K}}\), Gorenstein over \({\mathbb {K}}\)) if the ring \({\mathbb {K}}[\Delta ]\) is Cohen–Macaulay (resp. Buchsbaum, Gorenstein). In the above-mentioned notions, one can simply omit “over \({\mathbb {K}}\)” if either there is no ambiguity or they are independent of the base field. The most widely used criterion for determining when a simplicial complex is Cohen–Macaulay is due to Reisner, which says that links have only top homology (see [16, Corollary 4.2, page 60]).

Theorem 2.2

(Reisner’s criterion) Let \(\Delta \) be a simplicial complex. Then, \(\Delta \) is Cohen–Macaulay if and only if for all \(F\in \Delta \), \({\widetilde{H}}_i(\mathrm{lk}_{\Delta }(F);{\mathbb {K}})=0\) holds true for all \(i <\dim \mathrm{lk}_{\Delta }(F)\).

By Reisner’s criterion, we get the following lemma.

Lemma 2.3

Let \(\Delta \) be a simplicial complex with \(\dim \Delta =1\). Then, \(\Delta \) is Cohen–Macaulay if and only if \(\Delta \) is connected.

Let \(f_i\) denote the number of faces of \(\Delta \) of dimension i. The sequence \(f(\Delta )=(f_0,f_1,\ldots ,f_{d-1})\) is called the f-vector of \(\Delta \). Letting \(f_{-1}=1 \), the reduced Euler characteristic of \(\Delta \), denoted by \({\widetilde{\chi }}(\Delta )\), is defined to be

$$\begin{aligned} {\widetilde{\chi }} (\Delta )=\sum _{i=-1}^{d-1} (-1)^if_i. \end{aligned}$$

We call \(\Delta \) Eulerian if it is pure and \({\widetilde{\chi }}(\mathrm{lk}_{\Delta }(F))=(-1)^{\dim \mathrm{lk}_{ \Delta }(F)}\) holds true for all \(F \in \Delta \). We then have a criterion for determining when Cohen–Macaulay complexes are Gorenstein due to Stanley (see [16, Theorem 5.1, page 65]).

Theorem 2.4

Let \(\Delta \) be a simplicial complex. Then, \(\Delta \) is Gorenstein if and only if \(\mathrm{core}(\Delta )\) is an Eulerian complex which is Cohen–Macaulay.

For a graph G, let \(\Delta (G)\) be the set of independent sets in G. Then, \(\Delta (G)\) is a simplicial complex which is called the independence complex of G. It is easy to see that the Stanley–Reisner ideal of \(\Delta (G)\) is equal to the edge ideal of G, that is, \(I_{\Delta (G)}=I(G)\). This along with the terminology in the beginning of the paper implies that a graph G is Cohen–Macaulay (resp. Buchsbaum, Gorenstein) if and only if \(\Delta (G)\) is Cohen–Macaulay (resp. Buchsbaum, Gorenstein). We say that G is shellable (resp. vertex-decomposable) if \(\Delta (G)\) is shellable (resp. vertex-decomposable). The following lemma is needed in the sequel.

Lemma 2.5

Let \(G_1,\ldots , G_k\) be connected components of a graph G. Then, G is Gorenstein if and only if \(G_i\) is Gorenstein for all \(i=1,\ldots ,k\).

We also need a lemma that gives a criterion for a graph being Cohen–Macaulay. Indeed, it is a translation of the following theorem of Hibi.

Theorem 2.6

([9], pp. 95–96, Corollary, part b) Let \(\Delta \) be a pure simplicial complex of dimension d and let \(\sigma _1,\ldots ,\sigma _n\) be faces of \(\Delta \) satisfying \(\sigma _i\cup \sigma _j\notin \Delta \) for all \(i\ne j\). Also, let \(\Delta '=\Delta {\setminus } \{\tau \in \Delta \mid \tau \supseteq \sigma _i \text { for some } i\}\). If \(\mathrm{st}_\Delta (\sigma _i)\) is Cohen–Macaulay for all i and \(\Delta '\) is Cohen–Macaulay of dimension d, then \(\Delta \) is also Cohen–Macaulay.

By the above theorem, we get the following lemma.

Lemma 2.7

Let G be a well-covered graph such that the induced subgraph of G on \(S= \{x_1,\ldots ,x_m\}\subseteq V(G)\) is complete. If \(G {\setminus } N_G[x_i]\) is Cohen–Macaulay for all \(1\le i\le m\) and \(G{\setminus } S\) is Cohen–Macaulay with \(\alpha (G{\setminus } S)=\alpha (G)\), then G is also Cohen–Macaulay.

Proof

In order to prove the lemma, it is enough to show that \(\Delta =\Delta (G)\) is Cohen–Macaulay. We do this by using Theorem 2.6. First, note that since G is well-covered, \(\Delta \) is pure. Also, since the induced subgraph of G on S is a complete graph, \(\{x_i,x_j\}\in E(G)\) and thus \(\{x_i,x_j \}\notin \Delta \) for all \(1\le i\ne j\le m\).

Let \(1\le i\le m\) be arbitrary and fix it. The assumption implies that \(\Delta (G{\setminus } N_G[x_i])\) is Cohen–Macaulay, and since \(\mathrm{lk}_ {\Delta }(x_i)=\Delta (G{\setminus } N_G[x_i])\), we obtain that \(\mathrm{lk}_ {\Delta }(x_i)\) is Cohen–Macaulay. On the other hand, \(\mathrm{st}_{\Delta } (x_i)=\{x_i\}*\mathrm{lk}_{\Delta }(x_i)\), and for each \(\sigma \in \mathrm{st}_ {\Delta } (x_i)\), we have

$$\begin{aligned} \mathrm{lk}_{\mathrm{st}_{\Delta }(x_i)}(\sigma )= {\left\{ \begin{array}{ll} \{x_i\}*\mathrm{lk}_{\mathrm{lk}_{\Delta }(x_i)}(\sigma ) \quad &{}\text { if } x_i\notin \sigma , \\ \mathrm{lk}_{\mathrm{lk}_{\Delta }(x_i)}(\sigma {\setminus } \{x_i\}) &{}\text { if } x_i\in \sigma . \end{array}\right. } \end{aligned}$$

Therefore, by the Reisner’s criterion, we obtain that \(\mathrm{st}_{\Delta }(x_i)\) is Cohen–Macaulay.

Also, the assumption implies that

$$\begin{aligned} \Delta (G{\setminus } S) =\{\tau \in \Delta \mid \tau \cap S =\emptyset \}=\Delta {\setminus }\{\tau \in \Delta \mid x_i\in \tau \text { for some } i\} \end{aligned}$$

is Cohen–Macaulay, and we have \(\dim \Delta (G{\setminus } S)=\dim \Delta \).

Now, by using Theorem 2.6, we get \(\Delta \) is Cohen–Macaulay, as required. \(\square \)

2.3 Circulant graphs that we deal with

Let n be a positive integer and let \(S\subseteq [n]\). The circulant graph generated by S, denoted by \(C_n(S)\), is the graph whose vertex set is [n] in which two distinct vertices i and j are adjacent if and only if either \(|i-j|\in S\) or \(n-|i-j|\in S\). In the sequel, we consider the circulant graph generated by

$$\begin{aligned} S_n=\big \{k\in [n]\mid \gcd (k,n)=1\big \} \end{aligned}$$

and its complement, i.e., the graphs \(C_n(S_n)\) and \(\overline{C_n(S_n)}\). It is well-known that \(\gcd (k,n)=\gcd (n-k,n)\), and thus we obtain \(\{i,j\}\in E(C_n(S_n))\) if and only if \(|i-j|\in S_n\). Therefore, the complement of \(C_n(S_n)\) is again a circulant graph which is generated by

$$\begin{aligned} S'_n=\big \{k\in [n]\mid \gcd (k,n)\ne 1 \big \}, \end{aligned}$$

that is, \(\overline{C_n(S_n)}=C_n(S'_n)\). Moreover, \(\{i,j\}\in E(C_n (S'_n))\) if and only if \(|i-j|\in S'_n\).

It is easy to see that \(C_n(S_n)\) is a \(\varphi (n)\)-regular graph, that is, for every vertex i, \(\deg _{C_n(S_n)}(i)=\varphi (n)\). Here, \(\varphi \) is the Euler phi function, and thus the graphs that we consider here have a number-theoretical nature.

In the case of \(n\ge 2\), we may write \(n=p_1^{\alpha _1}\ldots p_k^{\alpha _k}\), where the \(p_i\)’s are distinct primes and the \(\alpha _i\)’s are positive integers. We now set

$$\begin{aligned} \Gamma _n=\big \{(a_1,\ldots ,a_k)\mid a_i\in \big [p_i^ {\alpha _i}\big ],\ 1\le i \le k\big \}, \end{aligned}$$

and we keep this notation fixed for the rest of the paper. The following easy lemma is useful.

Lemma 2.8

Let \(n\ge 2\) be an integer. Then, the function \(\gamma _n:[n]\longrightarrow \Gamma _n\) defined by \(\gamma _n(\ell ) =(\ell _1,\ldots ,\ell _k)\), where \(\ell _i\in \big [p_i^{\alpha _i}\big ]\) and \(\ell _ i\equiv \ell \ \big (\mathrm{mod}\ {p_i}^{\alpha _i}\big )\) for all \(i=1,\ldots ,k\), is a bijection.

Proof

Note that the function is well-defined. Now, let \((a_1,\ldots ,a_k)\in \Gamma _n\) be given. By Chinese remainder theorem, the system of equations

$$\begin{aligned} {\left\{ \begin{array}{ll} x\equiv a_1 &{}\quad \big (\mathrm{mod}\ {p_1}^{\alpha _1}\big ) \\ \, \vdots \\ x\equiv a_k &{}\quad \big (\mathrm{mod}\ {p_k}^{\alpha _k}\big ) \end{array}\right. } \end{aligned}$$

has a solution, say x. Suppose that \(\ell \in [n]\) and \(\ell \equiv x\ (\mathrm{mod}\ n)\). It is then easily seen that \(\gamma _n(\ell )=(a_1,\ldots ,a_k)\), and so \(\gamma _n\) is surjective. Since the number of elements of [n] and \(\Gamma _ n\) are equal, \(\gamma _n\) is injective too. \(\square \)

By the above lemma, for a given integer \(n\ge 2\), we may relabel the vertices of \(C_n(S_n)\) and \(C_n(S_n')\) by replacing \(\ell \) with \(\gamma _n(\ell )=(\ell _1, \ldots ,\ell _k)\). We do this relabeling freely whenever it is convenient.

3 Structural properties of \(C_n(S_n)\)

Let us start this section with the following key result. We show that by relabeling in Lemma 2.8, one may decompose the graph \(C_n(S_n)\) into smaller ones of the same type.

Proposition 3.1

Let \(n\ge 2\) be an integer. Then, the following isomorphism of circulant graphs holds true:

$$\begin{aligned} C_n(S_n)\cong C_{p_1^{\alpha _1}}\big (S_{p_1^{\alpha _1}}\big ) \times \cdots \times C_{p_k^{\alpha _k}}\big (S_{p_k^{\alpha _k}}\big ). \end{aligned}$$

Proof

Note that \(V(C_n(S_n))=[n]\) and \(V\big (C_{p_1^{\alpha _1}}\big (S_{p_1^{\alpha _1}}\big )\times \cdots \times C_{p_k^{\alpha _k}}\big (S_{p_k^{\alpha _k}}\big )\big )=\Gamma _n\). By Lemma 2.8, \(\gamma _n:[n] \rightarrow \Gamma _n\) is a bijection. Thus, for completing the proof, it is enough to show that \(\gamma _n\) is a graph isomorphism; that is, \(\ell \) is adjacent to \(\ell '\) in \(C_n(S_n)\) if and only if \(\gamma _n(\ell )=(\ell _1, \ldots ,\ell _k)\) is adjacent to \(\gamma _n( \ell ')=(\ell '_1,\ldots ,\ell '_k)\) in \(C_{p_1^{\alpha _1}}\big (S_{p_1^{\alpha _1}} \big )\times \cdots \times C_{p_k^ {\alpha _k}} \big (S_{p_k^{\alpha _k}}\big )\).

In order to show this, let \(1\le i\le k\) be given. We have \(\ell \equiv \ell _i\ \big (\mathrm{mod}\ {p_i}^{\alpha _i}\big )\) and \(\ell '\equiv \ell '_i\ \big (\mathrm{mod}\ {p_i}^{\alpha _i}\big )\), and so \(\ell -\ell '\equiv \ell _i-\ell '_i\ \big (\mathrm{mod}\ {p_i}^{\alpha _i}\big )\). Thus, \(\gcd \big (\ell -\ell ',{p_i}^{\alpha _i}\big )=1\) is equivalent to \(\gcd \big (\ell _i-\ell _i',{p_i}^{\alpha _i}\big )=1\), which in turn implies that \(\gcd \big (|\ell -\ell '|,{p_i}^{\alpha _i}\big )=1\) is equivalent to \(\gcd \big (|\ell _i-\ell _i'|,{p_i}^{\alpha _i}\big )=1\). Therefore,

$$\begin{aligned} \{\ell ,\ell '\}\in E(C_n(S_n))&\Longleftrightarrow |\ell -\ell '|\in S_n \\&\Longleftrightarrow \gcd (|\ell -\ell '|,n)=1 \\&\Longleftrightarrow \gcd \big (|\ell -\ell '|,{p_i}^{\alpha _i}\big )=1,\ \mathrm{for\ all }\ 1\le i\le k \\&\Longleftrightarrow \gcd \big (|\ell _i-\ell '_i|,{p_i}^{\alpha _i}\big )=1,\ \mathrm{for\ all}\ 1\le i\le k \\&\Longleftrightarrow |\ell _i-\ell '_i|\in S_{{p_i}^{\alpha _i}},\ \mathrm{for\ all}\ 1\le i\le k \\&\Longleftrightarrow \{\ell _i,\ell '_i\}\in E\big (C_{p_i^{\alpha _i}}\big (S_{p_i ^{\alpha _i}}\big )\big ),\ \mathrm{for\ all}\ 1\le i\le k \\&\Longleftrightarrow \{\gamma _n(\ell ),\gamma _n(\ell ')\}\in E\big (C_{p_1^{\alpha _1}}\big (S_{p_1^{\alpha _1}}\big )\times \cdots \times C_{p_k^{\alpha _k}} \big (S_{ p_k^{\alpha _k}}\big )\big ), \end{aligned}$$

as required. \(\square \)

The following proposition gives us the complete description of the smaller circulant graphs appearing in Proposition 3.1.

Proposition 3.2

Let p be a prime number and \(\alpha \) be a positive integer. Then, \(C_{p^{ \alpha }}\big (S_{p^{\alpha }}\big )\) is a complete p-partite graph with partite sets

$$\begin{aligned} I_a=\big \{a+kp \mid 0\le k \le p^{\alpha -1}-1\big \} \quad (0\le a \le p-1). \end{aligned}$$

In particular, the \(I_a\)’s are the only maximal independent sets in \(C_{p^{\alpha }}\big (S_{p^{\alpha }}\big )\), and so, we have \(\alpha \big ( C_{p^{\alpha }}\big (S_{p^{\alpha }}\big )\big )=p^{\alpha -1}\). Furthermore, the f-vector of \(\Delta \big (C_ {p^{\alpha }}\big (S_{p^ {\alpha }}\big )\big )\) is

$$\begin{aligned} \Bigg (1,p^{\alpha },p\left( {\begin{array}{c}p^{\alpha -1}\\ 2\end{array}}\right) , p\left( {\begin{array}{c}p^{\alpha -1}\\ 3\end{array}}\right) , \ldots , p\left( {\begin{array}{c}p^{\alpha -1}\\ p^{\alpha -1}-1\end{array}}\right) , p\Bigg ). \end{aligned}$$

Proof

It is clear that the \(I_a\)’s are nonempty mutually disjoint subsets of \(V\big (C_{p^\alpha }\big (S_{p^\alpha }\big )\big )\) with

$$\begin{aligned} V\big (C_{p^\alpha } \big (S_{p^\alpha } \big )\big )=\bigcup _{a=0}^{p-1} I_a. \end{aligned}$$

Also, for each \(0\le a\le p-1\), no two vertices of \(I_a\) are adjacent, because for any two vertices \(a+kp\) and \(a+k'p\) in \(I_a\), \(|(a+kp)-(a+k'p)|=|k-k'|p\) is not relatively prime to p. Moreover, for any \(0\le a,b\le p-1\) with \(a\ne b\), each vertex of \(I_a\) is adjacent to every vertex of \(I_b\). In order to show this, on the contrary, assume that the vertex \(a+kp\) in \(I_a\) is not adjacent to the vertex \(b+k'p\) in \(I_b\). Thus, \(\gcd \big ( |(a-b)+(k-k')p|,p\big )\ne 1\), and so \(p|a-b\), which implies that \(a=b\), a contradiction. Therefore, \(C_{p^\alpha } \big (S_{p^\alpha } \big )\) is a complete p-partite graph with partite sets \(I_a\) (\(0\le a\le p-1\)).

Now, it is clear that the \(I_a\)’s are the only maximal independent sets in \(C_{p^{\alpha }}\big (S_{p^{\alpha }}\big )\) and since \(|I_a| = p^{\alpha -1}\), for all \(0\le a\le p-1\), \(\alpha \big (C_{p^{\alpha }}\big (S_{p^{\alpha }}\big )\big )= p^{\alpha -1}\). Also, for each a, the number of independent sets in \(I_a\) with cardinality i is equal to \(\left( {\begin{array}{c}p^{\alpha -1}\\ i\end{array}}\right) \). Thus, the components of the f-vector of \(\Delta \big (C_ {p^{\alpha }}\big ( S_{p^{\alpha }}\big )\big )\) are

$$\begin{aligned} f_{i-1}\big (\Delta \big (C_{p^{\alpha }}\big (S_{p^{\alpha }}\big )\big )\big ) =p\left( {\begin{array}{c}p^{\alpha -1}\\ i\end{array}}\right) \quad \big (1\le i\le p^{\alpha -1}\big ), \end{aligned}$$

as required. \(\square \)

The above proposition gives us the f-vector of the circulant graph \(C_n(S_n)\) whenever n is a prime power. Accordingly, we may propose the following question.

Question 3.3

Let n be not a prime power and let \(\Delta \) be the independence complex of the circulant graph \(C_n(S_n)\). What is the f-vector of \(\Delta \)?

The following two propositions characterize when the circulant graphs \(C_n(S_n)\)’s are Buchsbaum, well-covered, etc.

Proposition 3.4

The following statements are equivalent : 

  1. (1)

    The circulant graph \(C_n(S_n)\) is Buchsbaum.

  2. (2)

    The circulant graph \(C_n(S_n)\) is well-covered.

  3. (3)

    Either \(n=1\) or n is a prime power.

Proof

(\(1 \Rightarrow 2\)): This part is trivial since Buchsbaum graphs are always well-covered.

(\(2 \Rightarrow 3\)): If \(n=1\), then we are done. If \(n\ge 2\), we may write \(n= p_1^{\alpha _1}\ldots p_k^{\alpha _k}\), where the \(p_i\)’s are distinct primes and the \(\alpha _i\)’s are positive integers. By Proposition 3.1 and Lemma 2.1, the sets

$$\begin{aligned} C_{p_1^{\alpha _1}}\big (S_{p_1^{\alpha _1}}\big ) \times \cdots \times C_{p_{j-1}^{\alpha _{j-1}}} \big (S_{p_{j-1}^{\alpha _{j-1}}} \big )\times I_j\times C_{p_{j+1}^{\alpha _ {j+1}}}\big (S_{p_{j+1}^{\alpha _ {j+1}}}\big )\times \cdots \times C_{p_k^{\alpha _k}} \big (S_{p_k^{\alpha _k}} \big ) \end{aligned}$$

are maximal independent sets in \(C_n(S_n)\), where \(I_j\) is a maximal independent set in \(C_{p_j^{\alpha _j}}\big (S_{p_j^{ \alpha _j}}\big )\) for all \(1\le j \le k\). Therefore, by Proposition 3.2, the size of different maximal independent sets in \(C_n(S_n)\) is equal to

$$\begin{aligned} p_j^{\alpha _j-1}\prod _{ {\mathop {i\ne j}\limits ^{i=1}}}^k p_i^{\alpha _i}. \end{aligned}$$

Since \(C_n(S_n)\) is well-covered, the above sizes are equal. This implies that \(k=1\), that is, n is a prime power.

(\(3 \Rightarrow 1\)): If \(n=1\), then \(C_n(S_n)\) is a one-vertex graph which is Buchsbaum. If n is a prime power, then \(n=p^\alpha \), where p is a prime and \(\alpha \) is a positive integer. For each vertex \(x\in V(C_n(S_n))\), by Proposition 3.2, the graph \(C_n (S_n){\setminus } N_{C_n(S_n)}[x]\) is an independent set of vertices, and so it is Cohen–Macaulay. Thus, \(C_n(S_n)\) is a Buchsbaum graph. \(\square \)

Proposition 3.5

The following statements are equivalent : 

  1. (1)

    The circulant graph \(C_n(S_n)\) is well-covered vertex-decomposable.

  2. (2)

    The circulant graph \(C_n(S_n)\) is well-covered shellable.

  3. (3)

    The circulant graph \(C_n(S_n)\) is Cohen–Macaulay.

  4. (4)

    Either \(n=1\) or n is a prime number.

Proof

(\(1 \Rightarrow 2\)) and (\(2 \Rightarrow 3\)): These parts are trivial since we know that for well-covered graphs,

$$\begin{aligned} \hbox {vertex-decomposable } \Rightarrow \hbox { shellable } \Rightarrow \hbox { Cohen}-\hbox {Macaulay.} \end{aligned}$$

(\(3 \Rightarrow 4\)): Let \(C_n(S_n)\) be Cohen–Macaulay. Therefore it is well-covered and so, by Proposition 3.4, either \(n=1\) or n is a prime power. In the latter case, let \(n=p^ \alpha \), where p is a prime and \(\alpha \) is a positive integer. If \(\alpha >1\), then \(\Delta ({C_n(S_n)})\) is a disconnected simplicial complex of positive dimension, which contradicts the Cohen–Macaulayness of \(C_n(S_n)\). Thus \(\alpha =1\), and so n is a prime number.

(\(4 \Rightarrow 1\)): If \(n=1\), then \(C_n(S_n)\) is a one-vertex graph, and, if n is a prime, then \(C_n(S_n)\) is a complete graph, which both are well-covered vertex-decomposable. \(\square \)

Based on Proposition 3.5, the set of Cohen–Macaulay circulant graphs that we have found are all vertex-decomposable. It is worth mentioning that there exist Cohen–Macaulay circulant graphs which are not vertex-decomposable. Indeed, they are shellable circulants (see [5]). Vander Meulen and Van Tuyl [18] have shown that there exists an infinite family of circulant graphs which are shellable but not vertex-decomposable.

Theorem 3.6

The circulant graph \(C_n(S_n)\) is Gorenstein if and only if either \(n=1\) or \(n=2\).

Proof

\((\Rightarrow )\): Since \(C_n(S_n)\) is Gorenstein, it is Cohen–Macaulay, and so, by Proposition 3.5, n is a prime number. Thus, by Proposition 3.2, \(C_n(S_n)\) is a complete graph, which along with Gorensteinness of \(C_n(S_n)\), implies that either \(n=1\) or \(n=2\).

\((\Leftarrow )\): If \(n=1\), then \(C_n(S_n)\) is a one-vertex graph, and, if \(n=2\), then \(C_n(S_n)\) is a one-edge graph, which both are Gorenstein. \(\square \)

4 Structural properties of \(C_n(S_n')\)

In this section, we consider the complement of \(C_n(S_n)\), that is, the circulant graph \(C_n(S_n')\). Let \(n\ge 2\) be an integer. We may write \(n=p_1^{\alpha _1}\ldots p_k^{\alpha _k}\), where the \(p_i\)’s are distinct primes in such a way that \(2\le p_1<\cdots <p_k\) and the \(\alpha _i\)’s are positive integers. This order on primes is necessary here and we will keep this fixed in the sequel. Now, by relabeling the vertices of \(C_n(S'_n)\) as described in Lemma 2.8, we partition the set of vertices of \(C_n(S'_n)\) into the following sets:

$$\begin{aligned} K_0&= \big \{(a_1,\ldots ,a_k)\mid a_i\in [{p_i}^{\alpha _i}],\ \mathrm{for\ all}\ 1\le i\le k,\ \mathrm{and}\ p_1 \mid a_1\big \}, \\ K_1&= K_0+(1,0,\ldots ,0), \\&\, \vdots&\\ K_{p_1-1}&= K_0+(p_1-1,0,\ldots ,0). \end{aligned}$$

Note that the size of each \(K_i\) is equal to \(n/p_1\). We keep this notation fixed for the rest of the paper.

Proposition 4.1

Let \(n\ge 2\) be an integer and \(p_1\) be the smallest divisor of n. Then, for every \(0\le i\le p_1-1\), the induced subgraph of \(C_n(S'_n)\) on \(K_i\) is a complete graph of size \(n/p_1\).

Proof

Let \((a_1+i,a_2,\ldots ,a_k)\) and \((b_1+i,b_2,\ldots ,b_k)\) be two vertices of \(C_n(S'_n)\) in \(K_i\). Thus, \(p_1|a_1\) and \(p_1|b_1 \), which implies that \(\gcd \big (|(a_1+i)-(b_1+i)|,p_1\big )\ne 1\). Therefore, \(a_1+i\) and \(b_1+i\) are not adjacent in \(C_{p_1^{ \alpha _1}}\big (S_{p_1^{\alpha _1}}\big )\). Hence, \((a_1+i, a_2,\ldots ,a_k)\) and \((b_1+i,b_2,\ldots ,b_k)\) are not adjacent in \(C_ {p_1^{ \alpha _1}}\big (S_{p_1^{\alpha _ 1}}\big )\times \cdots \times C_{p_k^{\alpha _k}} \big (S_{p_k^ {\alpha _k}}\big )\). Now, Proposition 3.1 implies that \((a_1+i,a_2,\ldots ,a_k)\) and \((b_1+i,b_2,\ldots ,b_k)\) are not adjacent in \(C_n (S_n)\), which means that they are adjacent in \(C_n(S'_n)\). Thus, the induced subgraph of \(C_n(S'_n)\) on \(K_i\) is a complete graph of size \(|K_i|=n/p_1\). \(\square \)

Proposition 4.2

Let p be a prime number and \(\alpha \ge 1\) be an integer. Then, \(C_{p^{\alpha }} \big (S'_{p^{\alpha }}\big )\) is a disjoint union of p complete graphs of sizes \(p^{\alpha -1}\). In particular, every independent set in \(C_{p^{\alpha }}\big (S'_ {p^{\alpha } }\big )\) can be extended to an independent set of size p.

Proof

By Proposition 4.1, for every \(0\le i\le p-1\), the induced subgraph of \(C_{p^{\alpha }}\big (S'_{p^{\alpha }}\big )\) on \(K_i\) is a complete graph of size \(p^\alpha /p=p^{\alpha -1}\). On the other hand, for any two vertices of \(C_{p^{\alpha }}\big (S'_{p^{ \alpha }}\big )\), one in \(K_i\), say \(a+i\), and the other one in \(K_j\) with \(j\ne i\), say \(b+j\), we have p|a, p|b and \(0\le i,j\le p-1\), and so \(\gcd \big (|(a+i)-(b+j)|,p\big )=1\), which means they are not adjacent in \(C_{p^{\alpha }}\big (S'_{p^{\alpha }}\big )\). Thus, \(C_{p^{\alpha }}\big (S'_{p^{\alpha }}\big )\) is a disjoint union of p complete graphs of sizes \(p^{\alpha -1}\). Now, the rest is obvious. \(\square \)

Proposition 4.3

Let \(n\ge 2\) be an integer. Then, the circulant graph \(C_n(S'_n)\) is well-covered. In particular, \(\alpha (C_n(S'_n))=p_1\), where \(p_1\) is the smallest divisor of n.

Proof

First, note that, by Proposition 4.1, the size of each independent set in \(C_n(S'_n)\) is at most \(p_1\). Second, we claim that every independent set in \(C_n(S'_n)\) can be extended to an independent set of size \(p_1\). These two together imply that all maximal independent sets in \(C_n (S'_n)\) have size \(p_1\), which shows that \(C_n(S'_n)\) is well-covered and gives us \(\alpha (C_n (S'_n))=p_1\), where \(p_1\) is the smallest divisor of n.

What remains is to prove the claim. For this, let

$$\begin{aligned} I=\big \{\big (a_1^1,\ldots , a_k^1\big ),\ldots ,\big (a_1^\ell ,\ldots ,a_k^\ell \big )\big \} \end{aligned}$$

be an independent set in \(C_n (S'_n)\) of size \(\ell \). If \(\ell =p_1\), we are done. Thus, we assume that \(\ell <p_1\). Since I is an independent set in \(C_n (S'_n)\), no two vertices in I are adjacent in \(C_n (S'_n)\). Hence, the vertices in I are mutually adjacent in \(C_n (S_n)\), and so, by Lemma 2.8, they are mutually adjacent in \(C_{p_1^{\alpha _1}}\big (S_{p_1^{ \alpha _1}}\big )\times \cdots \times C_{p_k^{\alpha _k}}\big (S_{p_k^{\alpha _k}} \big )\). This means that for every \(1\le i\le k\), the vertices in \(I_i=\big \{a_i^1,\ldots ,a_i^\ell \big \}\) are mutually adjacent in \(C_{p_i^{\alpha _i}}\big (S_{p_i^{\alpha _i}} \big )\), and so, no two of them are adjacent in \(C_{p_i^ {\alpha _i}}\big (S'_ {p_i^{\alpha _i}}\big )\), which means that \(I_i\) is an independent set in \(C_{p_ i^{\alpha _i}}\big (S'_{p_i^ {\alpha _i}}\big )\) of size \(\ell \). Thus, for every \(1\le i\le k\), by Proposition 4.2, we may extend \(I_i\) to an independent set in \(C_{p_i^{\alpha _i}}\big (S'_{p_i^ {\alpha _i}} \big )\) of size \(p_i\), say \(\widehat{I_i}=\big \{a_i^1,\ldots , a_i^\ell ,a_i^{\ell +1},\ldots , a_i^{p_i}\big \}\). Now, an argument similar to the one used in the beginning of the proof shows that

$$\begin{aligned} {\widehat{I}}=\big \{\big (a_1^1, \ldots ,a_k^1\big ),\ldots , \big (a_1^\ell ,\ldots , a_k^\ell \big ),\big (a_1^{\ell +1},\ldots ,a_k^{\ell +1} \big ),\ldots ,\big (a_1^{p_1},\ldots ,a_k^{p_1}\big ) \big \} \end{aligned}$$

is an independent set in \(C_n(S'_n)\) of size \(p_1\), which is an extension of I. \(\square \)

We continue the paper by determining when the circulant graph \(C_n(S'_n)\) is Cohen–Macaulay. Indeed, we show that it is always Cohen–Macaulay.

Theorem 4.4

Let \(n\ge 2\) be an integer. Then, the circulant graph \(C_n(S'_n)\) is Cohen–Macaulay.

Before going into the proof of Theorem 4.4, let us make a comment which deserves to be mentioned. As it is well-known, for chordal graphs, i.e., the graphs for which their induced cycles should have exactly three vertices, the notions of well-coveredness and Cohen–Macaulayness are equivalent. Therefore, for the circulant graphs \(C_n(S'_n)\)’s which are chordal, we can obtain Theorem 4.4 from Proposition 4.3. But, actually, this is not the case, since for \(n=385\), \(C_n(S'_n)\) is not a chordal graph. In order to see this, consider \(U=\{0,5,12, 23,28\}\). Note that \(n=5 \times 7 \times 11\). This implies that \(5,7,11,28\in S'_n\), while \(12,16,18,23\notin S'_n\). Therefore,

$$\begin{aligned} \{0,5\},\ \{5,12\},\ \{12, 23\},\ \{23,28 \}\ \mathrm{and}\ \{28,0\} \end{aligned}$$

are edges of \(C_n (S'_n)\), and

$$\begin{aligned} \{0, 12\},\ \{0,23\},\ \{5,23\},\ \{5,28\}\ \mathrm{and}\ \{ 12,28\} \end{aligned}$$

are not. Hence, the induced subgraph of \(C_n(S'_n )\) on U is a cycle with five vertices, which shows that \(C_n(S'_n)\) is not a chordal graph.

We divide the proof of Theorem 4.4 into three parts. First, we prove it for \(n=p^\alpha \), where p is a prime and \(\alpha \ge 1\) is an integer. Second, we prove the theorem for \(n=p^\alpha q^\beta \), where \(p<q\) are two primes and \(\alpha ,\beta \ge 1\) are two integers. This will be done in a series of steps. Finally, we prove the theorem for an arbitrary integer \(n\ge 2\) by generalizing the same trick in the second part.

Proof of Theorem 4.4

for \(n=p^\alpha \), where p is a prime and \(\alpha \ge 1\) is an integer By Proposition 4.2, \(C_n (S'_n)\) is a disjoint union of some complete graphs, and so, by the Reisner’s criterion, it is Cohen–Macaulay. \(\square \)

In order to do the second part, we need the following explanations and lemmas. Let p and q be two arbitrary positive integers. For \(0\le i\le p-1\) and \(0\le j\le q-1\), we let \(A_{ij}\)’s be some disjoint sets with the same size. Now, consider

$$\begin{aligned} R_i=\bigcup _{j=0}^{q-1}A_{ij} \quad (0\le i\le p-1 ) \end{aligned}$$

and

$$\begin{aligned} C_j=\bigcup _{i=0}^{p-1}A_{ij} \quad (0\le j\le q-1). \end{aligned}$$

Let G be the graph with vertex set

$$\begin{aligned} V(G)=\bigcup _{i=0}^{p-1}R_i \end{aligned}$$

and the edge set

$$\begin{aligned} E(G)=\left( \bigcup _{i=0}^{p-1}E(K_{R_i})\right) \cup \left( \bigcup _{j=0}^{q-1}E(K_ {C_j})\right) , \end{aligned}$$

where \(K_S\) denotes the complete graph on the vertex set S.

Lemma 4.5

If \(p\le q\) are two positive integers, then the graph G is well-covered with \(\alpha (G)=p\).

Proof

We first construct a maximal independent set in G. In order to do this, we take \(x_0\in R_0\) arbitrarily and without loss of generality we assume that \(x_0\in A_{00}\). Then, we choose \(x_1\in R_1{\setminus } A_{10}\). Now, \(\{x_0,x_1 \}\) is an independent set in G. Again, without loss of generality, we may assume that \(x_1\in A_{11}\). Next, we choose \(x_2\in R_2{\setminus }(A_{20}\cup A_{21})\). Note that \(\{x_0,x_1,x_2\}\) is again an independent set in G. As \(p\le q\), we continue this process to get \(x_{p-1}\in A_{p-1\ p-1}\) and the maximal independent set \(\{x_0,\ldots ,x_{p-1}\}\) in G. Now, it is clear that all maximal independent sets in G are of this form and they all have p elements. Therefore, G is well-covered with \(\alpha (G)=p\). \(\square \)

In the following lemma, we prove that the graph G for \(p<q\) is Cohen–Macaulay. We set \(\dim (G)=p+q\) and call it the dimension of G.

Lemma 4.6

If \(p<q\) are two positive integers, then the graph G is Cohen–Macaulay.

Proof

We prove the lemma by induction on \(\dim (G)\). If \(p=1\), then \(V(G)=R_0\) and \(E(G)= E(K_{R_0})\). Therefore, \(G=K_{R_0}\), which is Cohen–Macaulay. Thus, the lemma holds true for \(\dim (G)=3\). Let then \(p\ge 2\) and suppose that the assertion is true for all graphs \(G'\) with the same structure as G and with \(\dim (G')<p+q\). By Lemma 4.5, the graph G is well-covered, and also the induced subgraph of G on \(S=C_{q-1}\) is complete. Now, consider

$$\begin{aligned} R'_i= \bigcup _{j=0}^{q-2} A_{ij}\quad (0\le i\le p-1) \end{aligned}$$

and

$$\begin{aligned} C'_j= \bigcup _{i=0}^{p-2}A_{ij} \quad (0 \le j\le q-1). \end{aligned}$$

We show that \(G{\setminus } N_G[x]\) is Cohen–Macaulay for all \(x\in S\). In order to do this, let \(x\in S\) be given. Without loss of generality, we may assume that \(x\in A_{p-1\ q-1}\). Then, \(N_G[x]=R_{p-1}\cup C_{q-1}\) and so \(G {\setminus } N_G[x]\) is a graph with the vertex set

$$\begin{aligned} V(G{\setminus } N_G[x])= \bigcup _{i=0}^ {p-2}R'_{i} \end{aligned}$$

and the edge set

$$\begin{aligned} E(G{\setminus } N_G[x])=\left( \bigcup _{i=0}^ {p-2}E(K_{R'_i})\right) \cup \left( \bigcup _{j=0}^{q-2}E(K_{C'_j})\right) . \end{aligned}$$

Thus, \(G {\setminus } N_G[x]\) has the same structure as G with dimension \(p+q-2<p+q\). By the induction hypothesis, we obtain \(G{\setminus } N_G[x]\) is Cohen–Macaulay.

On the other hand, \(G{\setminus } S\) is a graph with the vertex set

$$\begin{aligned} V(G{\setminus } S)= \bigcup _{i=0}^{p-1}R'_{i} \end{aligned}$$

and the edge set

$$\begin{aligned} E(G{\setminus } S)=\left( \bigcup _{i=0}^{p-1}E(K_{R'_i})\right) \cup \left( \bigcup _{j=0}^{q-2} E(K_{C_j}) \right) . \end{aligned}$$

Thus, \(G{\setminus } S\) has also the same structure as G with dimension \(p+q-1<p+q\). Thus again, by the induction hypothesis, we obtain \(G{\setminus } S\) is Cohen–Macaulay. Moreover, since \(p<q\), we have \(p\le q-1\) and so Lemma 4.5 shows that \(\alpha (G{\setminus } S)=p=\alpha (G)\).

Now, Lemma 2.7 implies that G is Cohen–Macaulay. \(\square \)

Proof of Theorem 4.4

for \(n=p^\alpha q^\beta \), where \(p<q\) are two primes and \(\alpha ,\beta \ge 1\) are two integers In order to prove the theorem in this case, it is enough to show that the circulant graph \(C_n(S'_n)\) has the same structure as the above-mentioned graph G. We obtain then, using Lemma 4.6, it is Cohen–Macaulay. For \(0\le i\le p-1\) and \(0\le j\le q-1\), let

$$\begin{aligned} A_{ij}=\big \{x\in [n]\mid x\equiv i\ (\mathrm{mod}\ p)\ \text {and}\ x\equiv j\ (\mathrm{mod}\ q)\big \}. \end{aligned}$$

It is easy to see that the \(A_{ij}\)’s are disjoint sets with the same size n/pq and form a partition for [n]. Now, we may show that

$$\begin{aligned} R_i=\bigcup _{j=0}^{q-1}A_{ij}= \big \{x\in [n]\mid x\equiv i \ (\mathrm{mod}\ p)\big \} \end{aligned}$$

and

$$\begin{aligned} C_j=\bigcup _{i=0}^ {p-1}A_{ij}=\big \{x\in [n]\mid x\equiv j \ (\mathrm{mod}\ q)\big \}. \end{aligned}$$

Then, \(C_n(S'_ n)\) is exactly the graph with the vertex set

$$\begin{aligned} V(C_n(S'_n))=\bigcup _{i=0}^{p-1} R_i \end{aligned}$$

and the edge set

$$\begin{aligned} E(C_n(S'_n)) =\left( \bigcup _{i=0}^{p-1}E(K_{R_i})\right) \cup \left( \bigcup _ {j=0}^{q-1}E(K_ {C_j})\right) , \end{aligned}$$

which has the same structure as the above-mentioned graph G. \(\square \)

We now generalize the above construction of the graph G. Let \(p_1<\cdots <p_m\) be arbitrary positive integers. Suppose that \(1\le r\le m\) is given. We let \(A_{i_1,\ldots ,i_m}\)’s be some disjoint sets with the same size. Now, consider

$$\begin{aligned} C_{i_r}^{(p_r)}=\bigcup _{t\in \{1,\ldots ,m\}{\setminus }\{r\}}\left( \bigcup _{i_t =0}^{p_t-1}A_{i_1,\ldots ,i_t,\ldots ,i_m}\right) \quad (0\le i_r\le p_r-1,\ 1 \le r\le m). \end{aligned}$$

Let G be the graph with vertex set

$$\begin{aligned} V(G) =\bigcup _{i_r=0}^{p_r-1}C_{i_r}^{(p_r)}=\bigcup _{r=1}^m \left( \bigcup _{i_r=0}^ {p_r-1}A_{i_1, \ldots ,i_m}\right) \end{aligned}$$

and the edge set

$$\begin{aligned} E(G)=\bigcup _{r=1}^{m} \left( \bigcup _{i_ r=0}^{p_r-1 }E\Big (K_{C_{ i_r}^{(p_r)}}\Big )\right) , \end{aligned}$$

where \(K_S\) denotes the complete graph on the vertex set S.

Lemma 4.7

The graph G is Cohen–Macaulay with \(\alpha (G)=p_1\).

Proof

The proof is same as the proof of Lemmas 4.5 and 4.6 by using induction on \(p_1+\cdots + p_m\). \(\square \)

Proof of Theorem 4.4

for an arbitrary integer \(n\ge 2\) In order to prove the theorem in this general case, it is enough to show that the circulant graph \(C_n(S'_n)\) has the same structure as the above-mentioned graph G. We obtain then, using Lemma 4.7, it is Cohen–Macaulay. We may write \(n=p_1^{\alpha _1}\ldots p_m^{\alpha _m}\), where the \(p_i\)’s are distinct primes in such a way that \(2\le p_1<\cdots <p_m\) and the \(\alpha _i\)’s are positive integers. For \(1\le r\le m\) and \(0\le i_r\le p_r-1\), let

$$\begin{aligned} A_{i_1, \ldots ,i_m}=\big \{x\in [n]\mid x\equiv i_r\ (\mathrm{mod}\ p_r)\ \text {for all}\ 1\le r\le m\big \}. \end{aligned}$$

It is easy to see that the \(A_{i_1,\ldots ,i_m}\)’s are disjoint sets with the same size \(n/p_1\ldots p_m\) and form a partition for [n]. Now, we may show that

$$\begin{aligned} C_{i_r}^{(p_r)}=\bigcup _{t\in \{1,\ldots ,m\}{\setminus } \{r\}}\left( \bigcup _{i_t=0 }^{p_t-1}A_{i_1,\ldots ,i_t,\ldots ,i_m}\right) =\big \{ x\in [n]\mid x\equiv i_r \ (\mathrm{mod}\ p_r)\big \}. \end{aligned}$$

For \(0\le i<j\le n-1\), let \(\{i,j\}\in E(C_n(S'_n))\) be given. Then, \(|i-j|\in S'_n\), and so \(\gcd (j-i, n)\ne 1\). Thus, \(j-i\equiv 0 \ (\mathrm{mod}\ p_r)\) for some r, which implies that there exists \(0\le i_r\le p_r-1\) such that \(i,j\equiv i_r \ (\mathrm{mod}\ p_r)\). This means that \(i,j\in C_{i_r}^{(p_r)}\), thus \(\{i,j\}\in E(K_{C_{i_r} ^{(p_r)}} )\) and hence

$$\begin{aligned} \{i,j\} \in \bigcup _{r=1}^m\left( \bigcup _{i_r=0}^ {p_r-1}E\Big (K_{C_{i_r}^{(p_r)}}\Big )\right) . \end{aligned}$$

The converse of the above observation is also true and thus \(C_n(S'_n)\) is exactly the graph with the vertex set

$$\begin{aligned} V(C_ n(S'_n))=\bigcup _{i_r=0}^{p_r-1}C_{i_r}^{(p_r)} \end{aligned}$$

and the edge set

$$\begin{aligned} E(C_n(S'_ n))=\bigcup _{r=1}^{m}\left( \bigcup _{i_r=0}^{p_r-1}E\Big ( K_{C_{i_r}^{(p_r)}} \Big )\right) , \end{aligned}$$

which has the same structure as the above-mentioned graph G. \(\square \)

Here, we completed the proof of Theorem 4.4. It is worth mentioning that this theorem has an easy proof for even n’s which we give below.

Proof of Theorem 4.4

for an arbitrary even integer n By Proposition 4.3, \(\alpha (C_n (S_n'))=2\), and thus, \(\dim \Delta (C_n (S'_n))=1\). On the other hand, for all \(0\le i\le n-2\), \(\gcd \big (|(i+1)-i|,n \big )=1\), which means that \(\{i,i+1\} \notin E(C_n (S_n'))\), thus \(\{i,i+1\}\) is a face of \(\Delta (C_n(S'_n))\), or equivalently, is an edge of the 1-skeleton \(\Delta ^{(1)}(C_n(S'_n))\) of \(\Delta (C_n(S'_n))\). Therefore, \(0,1,\ldots ,n-1\) is a path in \(\Delta ^{(1)} (C_n(S'_n))\). This implies that \(\Delta ^{(1)} (C_n(S'_n))\) is connected and so \(\Delta (C_n(S'_n))\) is. Now, Lemma 2.3 implies that \(\Delta (C_n(S'_n))\) is Cohen–Macaulay and so \(C_n(S'_n)\) is, as required. \(\square \)

We continue the paper by studying the f-vector of \(\Delta (C_n (S'_n))\). When n is an even integer, we may compute the f-vector of \(\Delta (C_n (S'_n))\) easily. Indeed, in this case, since \(\dim \Delta (C_n(S'_n))=1\), the f-vector is \((f_{-1},f_0, f_1)\). It is obvious that \(f_{-1}=1\) and \(f_0=n\). For computing \(f_1\), we may write as follows, where \(\varphi \) is the Euler phi function:

$$\begin{aligned} f_1=\big |E\big (\overline{C_n(S'_n)}\big )\big |=|E(C_n(S_n))|= \frac{1}{2}\sum _{i=0}^{n-1}\deg _{C_n(S_n)}(i)=\frac{1}{2}\sum _ {i=0}^{n-1} \varphi (n)= \frac{n}{2}\varphi (n). \end{aligned}$$

Therefore, the f-vector of \(\Delta (C_n (S'_n))\) is \(\big (1,n,\frac{n}{2}\varphi (n)\big )\). In the following proposition, we compute the f-vector of \(\Delta (C_n(S'_n))\) in general. It is easy to check that when n is an even integer, the proposition agrees with the above observation.

Proposition 4.8

Let \(n\ge 2\) be an integer and \(p_1\) be the smallest divisor of n. Then, the f-vector of \(\Delta (C_n (S'_n))\) is \((f_{-1},f_0, f_1,\ldots ,f_{p_1-1})\), where for each \(0\le i\le p_1\), we have

$$\begin{aligned} f_{i-1}=\left( \frac{n}{p_1p_2\ldots p_k}\right) ^i(i!)^{k-1}\left( {\begin{array}{c}p_1\\ i\end{array}}\right) \left( {\begin{array}{c}p_2\\ i\end{array}}\right) \ldots \left( {\begin{array}{c}p_k\\ i\end{array}}\right) . \end{aligned}$$

Proof

By Proposition 4.3, \(\alpha (C_n(S_n'))=p_1\), and thus, \(\dim \Delta (C_n(S'_n))=p_1-1\). Therefore, the f-vector is \((f_{-1},f_0,f_1,\ldots ,f_ {p_1-1})\). We now compute the components.

By Proposition 4.1, for every \(0\le j\le p_1-1\), the induced subgraph of \(C_n(S'_n)\) on \(K_j\) is a complete graph. This implies that to construct an independent set, we have to choose only one element from each \(K_j\). Now, we are going to enumerate the number of independent sets of size i. To construct an independent set I of size i, say starting from \(K_0\), we may choose each \((a_1,a_2,\ldots ,a_k)\) from this set. Hence, the number of elements that we may choose from this set is equal to \(|K_0|=n/p_1\). For choosing \((b_1,b_2,\ldots ,b_k)\) as the second element of I from the other \(K_j\)’s, we must have \(\gcd (a_j-b_j,p_j)=1\) for every \(1\le j\le k\). Without loss of generality, we take \(K_1\). Therefore, \(b_1\) can be every element and so we have \({p_1}^{\alpha _1-1}\) choices for \(b_1\). For choosing \(b_2\), we cannot deal with \(b_2\)’s in the form of \(b_2=a_2+p_2t\). Therefore, for \(b_2\)’s, we have \({p_2}^{\alpha _2}-{p_2}^ {\alpha _2-1}\) choices. A similar argument shows that for all \(b_j\)’s (\(3\le j\le k\)), we have \({p_j}^{\alpha _j}-{p_j}^{\alpha _j-1}\) choices. Hence, all in all, we have

$$\begin{aligned} {p_1}^{\alpha _1-1}\big ({p_2}^{\alpha _2} -{p_2}^{\alpha _2-1}\big ) \ldots \big ({p_k}^{\alpha _k}-{p_k}^{\alpha _k-1}\big ) \end{aligned}$$

choices for \((b_1,b_2, \ldots ,b_k)\). For choosing \((c_1,c_2,\ldots ,c_k)\) as the third element of I from the other \(K_j\)’s, we must have \(\gcd (a_j-c_j,p_j) =\gcd (b_j- c_j,p_j)=1\) for every \(1\le j\le k\). Without loss of generality, we take \(K_2\). Therefore, \(c_1\) can be every element and so we have \({p_1}^{\alpha _1-1}\) choices for \(c_1\). For choosing \(c_2\), we cannot deal with \(c_2\)’s in the form of \(c_2=a_2+p_2t\) and \(c_2=b_2+p_2t'\). Therefore, for \(c_2\)’s, we have \({p_2}^{\alpha _2}-2{p_2}^{\alpha _2-1}\) choices. A similar argument shows that for all \(c_j\)’s (\(3\le j\le k\)), we have \({p_j}^{\alpha _j}-2{p_j}^{\alpha _ j-1}\) choices. Hence, all in all, we have

$$\begin{aligned} {p_1}^{\alpha _1-1}\big ({p_2}^{ \alpha _2}-2{p_2}^{\alpha _2-1}\big ) \ldots \big ({p_k}^{\alpha _k}-2{p_k}^{\alpha _ k-1}\big ) \end{aligned}$$

choices for \((c_1,c_2,\ldots ,c_k)\). Proceeding in this way, finally we may choose

$$\begin{aligned} {p_1}^{\alpha _1-1} \big ({p_2}^ {\alpha _2}-(i-1){p_2}^{\alpha _2 -1}\big )\ldots \big ({p_k}^{\alpha _k}-(i-1){p_k}^{\alpha _k-1}\big ) \end{aligned}$$

elements as the ith element of I. Since for constructing independent sets of size i, we may start from each \(K_j\) (instead of \(K_0\)) and continue on to the other \(K_j\)’s, so the number of independent sets of size i is equal to

$$\begin{aligned} \begin{aligned} f_{i-1}=\left( {\begin{array}{c}p_1\\ i\end{array}}\right) \times \frac{n}{p_1}&\times {p_1}^{\alpha _1-1}({p_2}^ {\alpha _2}-{p_2}^{\alpha _2-1})\ldots ({p_k}^{\alpha _k}-{p_k}^{\alpha _k-1}) \\&\times {p_1}^{\alpha _1-1}({p_2}^{\alpha _2}-2{p_2}^{\alpha _2-1})\ldots ({p_k} ^{\alpha _k}-2{p_k}^{\alpha _k-1}) \\&\vdots \\&\times {p_1}^{\alpha _1-1}({p_2}^{\alpha _2}-(i-1){p_2}^{\alpha _2-1})\ldots ({p_k}^{\alpha _k}-(i-1){p_k}^{\alpha _k-1}). \end{aligned} \end{aligned}$$

Now, to deduce the closed-form formula for \(f_{i-1}\), we may polish the above expression as follows:

$$\begin{aligned} \begin{aligned} f_{i-1}=\left( {\begin{array}{c}p_1\\ i\end{array}}\right) \times \frac{n}{p_1}&\times \left( {p_1}^{\alpha _1-1}{p_2}^ {\alpha _2-1}\ldots {p_k}^{\alpha _k-1}({p_2}-1)\ldots ({p_k}-1)\right) \\&\times \left( {p_1}^{\alpha _1-1}{p_2}^{\alpha _2-1}\ldots {p_k}^{\alpha _k-1}({p_2} -2)\ldots ({p_k}-2)\right) \\&\vdots \\&\times \left( {p_1}^{\alpha _1-1}{p_2}^{\alpha _2-1}\ldots {p_k}^{\alpha _k-1}({p_2}- (i-1))\ldots ({p_k}-(i-1))\right) \\&=\left( {\begin{array}{c}p_1\\ i\end{array}}\right) \times \frac{n}{p_1p_2\ldots p_k} \times (p_2\ldots p_k) \\&\times \left( \frac{n}{p_1p_2\ldots p_k}({p_2}-1)\ldots ({p_k}-1)\right) \\&\times \left( \frac{n}{p_1p_2\ldots p_k}({p_2}-2)\ldots ({p_k}-2)\right) \\&\vdots \\&\times \left( \frac{n}{p_1p_2\ldots p_k}({p_2}-(i-1))\ldots ({p_k}-(i-1))\right) \\&=\left( {\begin{array}{c}p_1\\ i\end{array}}\right) \times \left( \frac{n}{p_1p_2\ldots p_k}\right) ^i \times \left( p_2(p_2-1)(p_2-2)\right. \\&\left. \qquad \ldots (p_2-(i-1))\right) \\&\vdots \\&\times \left( p_k(p_k-1)(p_k-2)\ldots (p_k-(i-1))\right) \\&=\left( {\begin{array}{c}p_1\\ i\end{array}}\right) \times \left( \frac{n}{p_1p_2\ldots p_k}\right) ^i \times \left( {\begin{array}{c}p_2\\ i\end{array}}\right) (i!)\ldots \left( {\begin{array}{c}p_k\\ i\end{array}}\right) (i!) \\&=\left( \frac{n}{p_1p_2\ldots p_k}\right) ^i (i!)^{k-1}\left( {\begin{array}{c}p_1\\ i\end{array}}\right) \left( {\begin{array}{c}p_2\\ i\end{array}}\right) \ldots \left( {\begin{array}{c}p_k\\ i\end{array}}\right) , \end{aligned} \end{aligned}$$

as required. \(\square \)

As an application of the above proposition, we obtain the following result about the nonvanishing of the reduced Euler characteristic of \(\Delta (C_n( S'_n))\).

Proposition 4.9

Let either \(n>2\) be an even integer or \(n=p^\alpha \) be a prime power with \(\alpha >1\). If \(\Delta \) is the independence complex of the circulant graph \(C_n(S'_n)\), then \({\widetilde{\chi }}(\Delta )\ne 0\).

Proof

First, we suppose that \(n>2\) is an even integer, that is, \(n=2k\) for some \(k>1\). In this case, by the observation just before Proposition 4.8, we obtain that \(f_{-1}=1\), \(f_0=n\) and \(f_1=\frac{n}{2}\varphi (n)\), and so

$$\begin{aligned} {\widetilde{\chi }}(\Delta )=1-n+\frac{n}{2}\varphi (n)=1-2k+k\varphi (2k)=k \left( \frac{1}{k}-\big (2-\varphi (2k)\big )\right) . \end{aligned}$$

Now, \(k>1\) implies that \(\frac{1}{k}\) is not an integer, while \(2-\varphi (2k)\) is an integer, thus \({\widetilde{\chi }}(\Delta ) \ne 0\).

Second, we suppose that \(n=p^\alpha \) is a prime power with \(\alpha >1\). In this case, by Proposition 4.8, we obtain that for every \(0\le i\le p\), \(f_{i-1 }=\left( {\begin{array}{c}p\\ i\end{array}}\right) p^{i(\alpha -1)}\), and so

$$\begin{aligned} {\widetilde{\chi }}(\Delta )= & {} \sum _{i=-1}^{p-1}(-1)^if_i=-\sum _{i=0}^{p}(-1)^if_{i-1}\\= & {} -\sum _{i=0}^{p}\left( {\begin{array}{c}p\\ i\end{array}}\right) 1^{p-i} \big (-p^{\alpha -1}\big )^i =-\big (1-p^{\alpha -1}\big )^p. \end{aligned}$$

Now, \(\alpha >1\) implies that \(p^{\alpha -1}>1\), thus \({\widetilde{\chi }}(\Delta ) \ne 0\). \(\square \)

There are nice properties about the nonvanishing of the reduced Euler characteristic \({\widetilde{\chi }}(\Delta )\) of \(\Delta \) due to a conjecture of Hoshino in his PhD thesis [11, Conjecture 5.38] (see also [14]). Based on this point and Proposition 4.9, and also by using Theorem 4.4 and [6, Corollary 4.8], we can make the following observation: If either \(n>2\) is an even integer or \(n=p^\alpha \) is a prime power with \(\alpha >1\), then the regularity and depth of the edge ring of \(\Delta (C_n(S' _n))\) is equal to the smallest divisor of n.

As the last result of this paper, we determine when the circulant graph \(C_n(S'_n)\) is Gorenstein.

Theorem 4.10

The circulant graph \(C_n(S'_n)\) is Gorenstein if and only if \(n=1\), \(n=4\), \(n=6\) or \(n=p\), where p is a prime number.

Proof

\((\Rightarrow )\): For simplicity, we set \(\Delta =\Delta (C_n(S'_n))\). If \(n=1\), then we are done. Thus, we suppose that \(n\ge 2\), and we write \(n=p_1^{\alpha _1} \ldots p_k^{\alpha _k}\), where the \(p_i\)’s are distinct primes in such a way that \(2\le p_1<\cdots <p_k\) and the \(\alpha _i\)’s are positive integers. If \(k=1\) and \(\alpha _1=1\), then \(n=p_1\) and again we are done. Hence, we suppose that either \(k\ge 2\) or \(\alpha _1\ge 2\). This implies that \(S'_n\ne \{0\}\), thus \(C_n(S'_n)\) has no isolated vertices, and so \(\Delta =\mathrm{core}(\Delta )\). Therefore, Theorem 2.4 implies that \({\widetilde{\chi }}(\Delta )=(-1)^ {p_1-1}\). We claim that \(p_1=2\). This implies that \({\widetilde{\chi }}(\Delta ) =-1\), and so, by Theorem 4.4, we obtain \(n=\frac{n}{2}\varphi (n)\). Therefore, \(\varphi (n)=2\), which means that either \(n =4\) or 6, as required.

What remains is to prove the claim. By Proposition 4.8, the f-vector of \(\Delta (C_n (S'_n))\) is \((f_{-1},f_0, f_1,\ldots ,f_{p_1-1})\), where for each \(0\le i\le p_1\), we have

$$\begin{aligned} f_{i-1}&=\left( \frac{n}{p_1p_2\ldots p_k}\right) ^i (i!)^{k-1}\left( {\begin{array}{c}p_1\\ i\end{array}}\right) \left( {\begin{array}{c}p_2\\ i\end{array}}\right) \ldots \left( {\begin{array}{c}p_k\\ i\end{array}}\right) \\&=\frac{n}{i!}\big (p_1^{\alpha _1-1}\ldots p_k^{\alpha _k-1}\big )^{i-1}\prod _ {j=1}^k (p_j-1)\ldots \prod _{j=1}^k(p_j-i+1). \end{aligned}$$

Suppose, on the contrary, that \(p_1\) is odd. Therefore, \({\widetilde{\chi }} (\Delta ) =1\), and so,

$$\begin{aligned} n-f_1+f_2-\cdots +(-1)^{p_1-1} f_{p_1-1} =2. \end{aligned}$$

By letting \(f_{i-1 }=\frac{n}{i!}a_{i-1}\), where

$$\begin{aligned} a_{i-1}=\big (p_1^{\alpha _1-1} \ldots p_k^ {\alpha _k-1}\big )^{i-1}\prod _{j=1}^k(p_j-1)\ldots \prod _{j=1}^k(p_j -i+1)\in {\mathbb {N}}, \end{aligned}$$

the above equality can be written as

$$\begin{aligned} n-\left( \frac{n}{2!}a_1 \right) +\left( \frac{n}{3!}a_2\right) -\cdots +(-1)^{p_1-1}\left( \frac{n}{p_1!} a_{p_1 -1}\right) =2, \end{aligned}$$

which in turn is equivalent to

$$\begin{aligned} n\left( 1-\frac{a_1}{2!}+ \frac{a_2}{3!}-\cdots +(-1)^{p_1-1}\frac{a_{p_1-1}}{p_1!}\right) =2 \end{aligned}$$

or

$$\begin{aligned}&n\Big ( (p_1!)-(3 \times 4\times \cdots \times p_1)a_1+(4\times 5\times \cdots \times p_1) a_2 \\&\quad -\cdots +(-1)^{p_1-1} a_{p_1-1}\Big )=2(p_1!). \end{aligned}$$

This latter equality shows that \(n\mid 2(p_1!)\), and so, \(n\mid (p_1!)\), that is, \(p_1^{\alpha _1}\ldots p_k^{\alpha _k} \mid (p_1!) \). But for all \(j\ge 2\), one has \(p_1<p_j\) and hence \(p_j\not \mid (p_1!) \). This implies that \(k=1\), and so, \(n=p_1^{\alpha _1}\), where, in this case, \(\alpha _1\) must be at least 2. Hence, \(p_1^{\alpha _1-1}\ge 3\) and so the complete graph \(K_{p_1^ {\alpha _1-1}}\) is not Gorenstein. But, by Proposition 4.2, \(C_{ p_1^{ \alpha _1}}\big (S'_{p_1^ {\alpha _1}}\big )\) is a disjoint union of \(p_1\) complete graphs \(K_{p_1^ {\alpha _1-1}}\), and thus \(C_{p_1^{\alpha _1}}\big (S'_ {p_1^ {\alpha _1}}\big )\) is not a Gorenstein graph by Lemma 2.5. This is a contradiction.

\((\Leftarrow )\): Again we set \(\Delta =\Delta (C_n(S'_n))\). If either \(n=1\) or \(n=p\), where p is a prime number, then \(S'_p=\{0\}\), and thus \(C_p(S_p')\) is an independent set of p vertices. Hence, \(\mathrm{core}(\Delta )=\{\emptyset \}\), and so by Theorems 2.2 and 2.4, \(\Delta \) is Gorenstein. If either \(n=4\) or 6, then \(\Delta \) is isomorphic to the one-dimensional sphere \({\mathbb {S}}^1\), and thus it is again Gorenstein. Thus, \(C_n(S'_n)\) is Gorenstein. \(\square \)

Finally, we close the paper by mentioning a point related to the Gorenstein property and circulant graphs. By Theorems 3.6 and 4.10, the first set of Gorenstein circulant graphs that we have found are the graphs \(C_n(S_n)\) for \(n=1\) and 2, and the second set of Gorenstein ones are the graphs \(C_n (S'_n)\) for \(n=1,\ 4,\ 6\) and p, where p is a prime number. Note that the independence number of these Gorenstein circulant graphs is 1, 2 or p. In [13], Rinaldo has given a characterization of Gorenstein circulant graphs with independence number two.