<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amscd}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{psfig}
\usepackage{graphics,amsmath,amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{epsf}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.1in}
\setlength{\textheight}{8.4in}

\usepackage{amsbsy}
\usepackage{tikz}
\usetikzlibrary[arrows]

\newcommand{\bba}{\hbox{\boldmath $\alpha$}}
\newcommand{\bbb}{\hbox{\boldmath $\beta$}}
\newcommand{\comment}[1]{}
\newcommand{\I}{\mathcal{I}}

\newcommand{\seqnum}[1]{\href{http://oeis.org/#1}{\underline{#1}}}

\begin{document}

\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\begin{center}
\vskip 1cm{\LARGE\bf 
Cyclic, Dihedral and Symmetrical Carlitz \\
\vskip .1in
Compositions of a Positive Integer
}
\vskip 1cm
\large
Petros Hadjicostas \\ 
9 Ikarou Str.\\ 
Larnaka 6050 \\ 
Cyprus \\
\href{mailto: peterhadji1@gmail.com}{\tt peterhadji1@gmail.com}
\end{center}

\vskip .2 in

\begin{abstract}
A linear composition of a positive integer $N$ is a list of positive
integers (called parts) whose sum equals $N$. We distinguish two kinds
of cyclic compositions, which we call  C-type and CR-type. A CR-type
cyclic composition of $N$ is an equivalence class of all linear
compositions of $N$ that can be obtained from each other by a cyclic
shift, while a dihedral composition is an equivalence class of all
linear compositions of $N$ that can be obtained from each other by a
cyclic shift or a reversal of order. A linear Carlitz composition is
one where adjacent parts are distinct. A C-type cyclic Carlitz
composition is a linear Carlitz composition whose first and last parts
are distinct, whereas a CR-type cyclic Carlitz composition is an
equivalence class of C-type Carlitz compositions that can be obtained
from each other by a cyclic shift. We distinguish two kinds of linear
palindromic compositions (type I and type II). We derive generating
functions for the number of type II linear palindromic Carlitz
compositions, and we provide a new proof of a result by J.~Taylor about
C-type Carlitz compositions. Using these results, we derive formulas
about CR-type Carlitz compositions, symmetrical CR-type compositions,
and dihedral Carlitz compositions.
\end{abstract}

\section{Introduction and main results}\label{sone001x}

A {\it linear composition} (or just, a {\it composition}, as it is known by other authors) of a positive integer $N$ of {\it length} $K$ is a $K$-tuple
$(\lambda_1,\lambda_2,\ldots,\lambda_K) \in {\mathbb Z}_{&gt;0}^K$ such that
\begin{equation}\label{bailey}
N=\lambda_1+\lambda_2+\cdots+\lambda_K;
\end{equation}
see MacMahon~\cite{fujit1,fat1}.
Here, the numbers $\lambda_1,\lambda_2,\ldots,\lambda_K$ are called the {\it parts} of the composition. We denote the number of linear compositions of $N$ with $K$ parts in the set $A \subseteq {\mathbb Z}_{&gt;0}$ by $c_A^L(N;K)$. It is proven in Beck and Robbins~\cite{beck2015}, Heubach and Mansour~\cite{heubach},  Hoggatt and Lind~\cite{hoggart}, and Moser and Whitney~\cite{moser}, that the bivariate generating function for $c_A^L(N;K)$ is
$$\sum_{N,K\geq 0} c_A^L(N;K) \, x^N y^K=1+\sum_{N,K\geq 1} c_A^L(N;K) \, x^N y^K=
\frac{1}{1-y \sum_{a \in A} x^a}.$$
(Here we assume $c_A^L(N;0)=0$ if $N &gt;0$, and $c_A^L(0;0)=1$.) We let $c_A^L(N)=\sum_{K=1}^N c_A^L(N;K),$ and in general, if $T_A(N;K)$ denotes the total number of compositions of some kind (or the total number of equivalence classes of compositions of some kind) of $N$ with length $K$ and parts in $A$, then we let $T_A(N)=\sum_{K=1}^N T_A(N;K)$.
In addition, throughout the paper we assume $$\mbox{$T_A(N;K)=0$ when $N&lt;K$.}$$

In the literature, there are two kinds of {\it cyclic compositions}, and following Zhang and Hadjicostas~\cite{zhang2}, in this paper, we call them C-type and CR-type. (For linear compositions, i.e., ordinary compositions, following Zhang and Hadjicostas~\cite{zhang2} again, we use the term L-type.)  

A {\it CR-type cyclic composition} of $N$ of length $K$ is an equivalence class consisting of all linear compositions of $N$ with length $K$ that can be obtained from each other by a cyclic shift; see Sommerville~\cite{Sommer}, Knopfmacher and Robbins~\cite{knob33}, and Razen, Seberry and Wehrhahn~\cite{razen}. We denote the number of all such CR-type cyclic compositions of $N$ with $K$ parts in $A \subseteq {\mathbb Z}_{&gt;0}$ by $c_A^{CR}(N;K)$. On the other hand, a {\it dihedral composition} is an equivalence class of all linear compositions that can be obtained from each other either by a cyclic shift or a reversal of order; see Knopfmacher and Robbins~\cite{knob} and Zagaglia Salvi~\cite{salvi1}. We denote the number of all dihedral compositions of $N$ with $K$ parts in $A \subseteq {\mathbb Z}_{&gt;0}$ by $c_A^D(N;K)$. If $(\lambda_1,\ldots,\lambda_K)$ is a representative of a CR-type cyclic composition, we denote its equivalence class by $[(\lambda_1,\ldots,\lambda_K)]_{CR}$, while if it is a representative of a dihedral composition, we denote its equivalence class by $[(\lambda_1,\ldots,\lambda_K)]_{D}$. 

Hadjicostas~\cite{hadji123} proved that the bivariate generating function for the number of CR-type cyclic compositions of $N$ with $K$ parts in $A$ is
$$\sum_{N,K\geq 1} c_A^{CR}(N;K) \, x^N y^K=\sum_{s \geq 1} \frac{\phi(s)}{s} \log \frac{1}{1-y^s \sum_{a \in A} x^{as}}.$$
(There is an obvious typo in the corresponding formula in Section~2.2 in Hadjicostas and Zhang~\cite{123AAL}.)
Here, $\phi(n)$ is Euler's totient function at positive integer $n$, i.e., the number of positive integers less than or equal to $n$ that are co-prime to $n$.

An {\it L-type Carlitz composition} of $N$ with length $K$ is a linear composition $(\lambda_1,\lambda_2,\ldots,\lambda_K)$ such that $\sum_{i=1}^K \lambda_i=N$ and $\lambda_i \neq \lambda_{i+1}$ for $i=1,2,\ldots,K-1$; see Carlitz~\cite{carliz}, Corteel and Hitczenko~\cite{coret}, and Knopfmacher and Prodinger~\cite{macher}. On the other hand, a {\it C-type (cyclic) Carlitz composition} of $N$ with length $K$ is a linear composition $(\lambda_1,\lambda_2,\ldots,\lambda_K)$ such that $\sum_{i=1}^K \lambda_i=N$ and $\lambda_i \neq \lambda_{i+1}$ for $i=1,2,\ldots,K-1,K$, where we define $\lambda_{K+1}:=\lambda_1$. In other words, it is an L-type Carlitz composition of $N$ with length $K$ with the additional restriction $\lambda_K \neq \lambda_1$. We denote the number of L-type Carlitz compositions of $N$ with $K$ parts in $A \subseteq {\mathbb Z}_{&gt;0}$ by $E_A^L(N;K)$ and the number of C-type (cyclic) Carlitz compositions of $N$ with $K$ parts in $A$ by $E_A^C(N;K)$. It is proven in
Heubach and Mansour~\cite{heubach} that the bivariate generating function of $E_A^L(N;K)$ is
\begin{equation}\label{starA}
\sum_{N,K \geq 0} E_A^L(N;K) \, x^N y^K=1+\sum_{N,K\geq 1} E_A^L(N;K)\, x^N y^K=\frac{1}{1-\sum_{a \in A} \frac{x^a y}{1+x^a y}}.
\end{equation}
(We define $E_A^L(N;0)=0$ for $N&gt;0$ and $E_A^L(0,0)=1$.)
The bivariate generating function of $E_A^{C}(N;K)$ is discussed in Theorem~\ref{tru1} below.

Following Hadjicostas and Zhang~\cite{123AAL}, we define two kinds of linear palindromic compositions, which we call type I and type II. 
A {\it type I linear palindromic} composition of $N$ with length $K$ is a linear composition $(\lambda_1,\ldots,\lambda_K)$ of $N$
such that
$$(\lambda_1,\lambda_2,\ldots,\lambda_K)=(\lambda_K,\lambda_{K-1},\ldots,\lambda_1),$$
i.e., $\lambda_i=\lambda_{K+1-i}$ for $i=1,\ldots,K$; see MacMahon~\cite{fujit1}.
A {\it type II linear palindromic} composition of $N$ with length $K$ is a linear composition $(\lambda_1,\ldots,\lambda_K)$ of $N$
such that $$(\lambda_1,\lambda_2,\ldots,\lambda_K)=(\lambda_1,\lambda_K,\ldots,\lambda_2),$$
i.e, $\lambda_i=\lambda_{K+2-i}$ for $i=2,\ldots,K$. For $K=1$, we assume that $(\lambda_1)=(N)$ is a linear palindromic composition of both types. We denote the number of type I linear palindromic compositions of $N$ with $K$ parts in $A$ by $P_A^{L_1}(N;K)$ and those of type II by $P_A^{L_2}(N;K)$. We also denote by $F_A^{L_1}(N;K)$ and $F_A^{L_2}(N;K)$ the numbers of {\it type I and type II Carlitz linear palindromic compositions} of $N$ with $K$ parts in $A$, respectively.

Heubach and Mansour~\cite{heubach} proved that the bivariate generating function of $P_A^{L_1}(N;K)$ is 
\begin{equation}\label{SOSO}
\sum_{N,K \geq 0} P_A^{L_1}(N;K)\,x^N y^K=1+\sum_{N,K \geq 1} P_A^{L_1}(N;K)\, x^Ny^K=\frac{1+\sum_{a \in A} x^a y}{1-\sum_{a \in A} x^{2a} y^2},
\end{equation}
while the bivariate generating function of $F_A^{L_1}(N;K)$ is 
\begin{equation}\label{rema1}
\sum_{N,K \geq 1} F_A^{L_1}(N;K)\, x^Ny^K=\frac{\sum_{a \in A} \frac{x^ay}{1+x^{2a}y^2}}{1-\sum_{a \in A} \frac{x^{2a}y^2}{1+x^{2a}y^2}}.
\end{equation}
It is clear that, if $K$ is even, then $F_A^{L_1}(N;K)=0$. (We assume that $P_A^{L_1}(0;0)=F_A^{L_1}(0;0)=1$ and $P_A^{L_1}(N;0)=F_A^{L_1}(N;0)=0$ for $N \neq 0$.)

Hadjicostas and Zhang~\cite{123AAL} also proved that the bivariate generating function of the numbers $P_A^{L_2}(N;K)$ is given by
\begin{equation}\label{MOMO}
\sum_{N,K\geq 1} P_A^{L_2}(N;K) \, x^N y^K = \frac{\left(\sum_{a \in A} x^a\right)y+\left(\sum_{a \in A}x^a\right)^2 y^2}{1-y^2 \sum_{a \in A} x^{2a}}.
\end{equation}
The bivariate generating function of $F_A^{L_2}(N;K)$ is given in Theorem~\ref{kentucky} later in this section. 

Sommerville~\cite[pp.~301--304]{Sommer} examined {\it symmetrical CR-type cyclic compositions} of $N$ with length $K$. In the terminology of Hadjicostas and Zhang~\cite{123AAL}, a CR-type cyclic composition of $N$ with length $K$
is called symmetrical if and only if its equivalence class contains at least one type I or II linear palindromic composition. Hadjicostas and Zhang~\cite{123AAL} proved that, if $N,K&gt;1$, then the equivalence class of every symmetrical cyclic composition of $N$ with length $K$ (but excluding the one with all the parts being equal when $K$ divides $N$) contains exactly two linear palindromic compositions of type I or II. As a result, after including the trivial case $K=1$, the number of symmetrical CR-type cyclic compositions of $N$ with $K$ parts in $A \subseteq {\mathbb Z}_{&gt;0}$ is
\begin{equation}\label{NONO}
P_A^{CR}(N;K)=\frac{P_A^{L_1}(N;K)+P_A^{L_2}(N;K)}{2} \quad \mbox{for $1 \leq K \leq N$}.
\end{equation}
As Hadjicostas and Zhang~\cite{123AAL} have shown, equations~(\ref{SOSO}), (\ref{MOMO}) and (\ref{NONO}) imply that the bivariate generating function of $P_A^{CR}(N,K)$ is
$$\sum_{N,K \geq 1} P_A^{CR}(N,K)\, x^Ny^K=\frac{\left(1+y\sum_{a \in A}x^a\right)^2}{2\left(1-y^2\sum_{a \in A}x^{2a}\right)}-\frac{1}{2}.$$

Hadjicostas and Zhang~\cite{123AAL} also observed that the number of dihedral compositions of $N$ with $K$ parts in $A$ is 
\begin{eqnarray}
c_A^D(N; K) &amp;=&amp; \frac{c_A^{CR}(N; K)-P_A^{CR}(N; K)}{2} + P_A^{CR}(N; K)\label{notalk}\\
&amp;=&amp;\frac{c_A^{CR}(N; K)+P_A^{CR}(N; K)}{2}\nonumber \\
&amp;=&amp;\frac{2c_A^{CR}(N; K)+P_A^{L_1}(N; K)+P_A^{L_2}(N; K)}{4}.\nonumber
\end{eqnarray} 
It follows that the bivariate generating function of $c_A^{D}(N;K)$ is 
$$\sum_{N,K \geq 1} c_A^{D}(N;K)\, x^N y^K=\frac{1}{2}\sum_{s \geq 1} \frac{\phi(s)}{s} \log \frac{1}{1-y^s \sum_{a \in A} x^{as}}+
\frac{\left(1+y\sum_{a \in A}x^a\right)^2}{4\left(1-y^2\sum_{a \in A}x^{2a}\right)}-\frac{1}{4}.$$

In this paper, we prove a number of new results and give new proofs to some others found in the literature about generating functions of numbers of Carlitz compositions of special kinds. The first result gives the univariate generating function of the number of L-type Carlitz compositions with fixed length $K$ and parts in a set $A$. The proofs of all the results can be found in Section~\ref{proofs}.

\begin{theorem}\label{ANO2}
Let $K \in {\mathbb Z}_{&gt;0}$ and $A \subseteq {\mathbb Z}_{&gt;0}$. Then 
\begin{equation}\label{BABA1}
\sum_{N \geq 1}E_A^{L}(N;K)\, x^N=\sum \frac{(\ell_1+\cdots+\ell_K)! (-1)^{\ell_1+\cdots+\ell_K+K}}{\ell_1! \cdots \ell_K!} \prod_{i=1}^K \left(\sum_{a \in A} x^{i a} \right)^{\ell_i},
\end{equation}
where the sum ranges over the set 
$${\cal L}_K=\{(\ell_1,\ell_2,\ldots,\ell_K) \in {\mathbb Z}_{\geq 0}^K:\,\, \sum_{i=1}^K i\ell_i=K\}$$
of all integer partitions of $K$.
\end{theorem}

The second result gives the univariate generating function of the number of type I linear palindromic Carlitz compositions with fixed length $K$ and parts in a set $A$.

\begin{theorem}\label{ANO3}
Let $K=2\rho+1$ with $\rho \in {\mathbb Z}_{\geq 0}$ and $A \subseteq {\mathbb Z}_{&gt;0}$. Then 
$$\sum_{N \geq 1}F_A^{L_1}(N;K)\, x^N  =  \sum_{N \geq 1} F_A^{L_1}(N;2\rho+1) \, x^{N}$$
\begin{equation}\label{KKKppp}
 = \sum \frac{(\alpha_1+\cdots+\alpha_{\rho})!\, (-1)^{\alpha_1+\cdots+\alpha_{\rho}+\rho}}{\alpha_1! \cdots \alpha_{\rho}!} \left(\sum_{a \in A} x^{\left(2\rho+1-2\sum_{i=1}^{\rho} i \alpha_i\right)a} \right) \prod_{i=1}^{\rho}\left(\sum_{a \in A} x^{2i a} \right)^{\alpha_i},
 \end{equation}
where the sum ranges over the set 
\begin{equation}\label{tror}
{\cal M}_{\rho}=\{(\alpha_1,\alpha_2,\ldots,\alpha_{\rho}) \in {\mathbb Z}_{\geq 0}^{\rho}:\,\, \sum_{i=1}^{\rho} i \alpha_i \leq \rho\}.
\end{equation}
(Here, ${\cal M}_0=\{()\}$ (set with the empty list), $\sum_{i=1}^0 \alpha_i=0$ and $\prod_{i=1}^0 \beta_i=1$.)
\end{theorem}
For $\rho \in {\mathbb Z}_{&gt;0}$, the number of elements, $\#{\cal M}_{\rho}$, of the set ${\cal M}_{\rho}$ above is given by the sequence \seqnum{A000070}. It can be easily shown that $\#{\cal M}_{\rho}=1+\sum_{s=1}^{\rho} \# {\cal L}_s$.

The next result gives the bivariate generating function of $F_A^{L_2}(N;K).$ 

\begin{theorem}\label{kentucky}
The bivariate generating function of the number of type-II linear palindromic Carlitz compositions of positive integer $N$ with $K$ parts in set $A \subseteq {\mathbb Z}_{&gt;0}$
is 
$$\sum_{N,K\geq 1} F_A^{L_2}(N;K)\, x^Ny^K=\frac{\left(\sum_{a\in A} \frac{x^ay}{1+x^{2a}y^2}\right)^2}{1-\sum_{a \in A} \frac{x^{2a}y^2}{1+x^{2a}y^2}}-\sum_{a \in A} \frac{x^{2a}y^2}{1+x^{2a}y^2}+\sum_{a \in A} x^a y.$$
If $K$ is an odd integer $\geq 3$, then $F_A^{L_2}(N;K)=0$. 
\end{theorem}

Next we state a result about the number of C-type cyclic Carlitz compositions of $N$ with $K$ parts in the set $A \subseteq {\mathbb Z}_{&gt;0}$. The result follows from Corollary~5.3 in Taylor~\cite{taylor1}, who has used a general theory involving Laguerre series to prove it. In this paper, we provide another (independent) proof of the result in Section~\ref{proofs}.

\begin{theorem}\label{tru1}
If $A \subseteq {\mathbb Z}_{&gt;0}$, then 
\begin{equation}\label{Alala}
\sum_{N,K \geq 1} E_A^C(N;K) \, x^N y^K =\sum_{a\in A} \frac{x^{2a}y^2}{1+x^a y}+\frac{\sum_{a\in A} \frac{x^a y}{(1+x^ay)^2}}{1-\sum_{a \in A}\frac{x^ay}{1+x^ay}}.
\end{equation}
\end{theorem}

Letting $y=1$ in equation~(\ref{Alala}) of Theorem~\ref{tru1} above, we get the generating function of the total number of C-type cyclic compositions of $N$ with parts in the set $A \subseteq {\mathbb Z}_{&gt;0}$. This is Corollary~5.4 in Taylor~\cite{taylor1}, which is an answer to a research question posed by Heubach and 
Mansour~\cite[pp.~87--88]{heubach1}. 

\begin{corollary}\label{tru2}
If $A \subseteq {\mathbb Z}_{&gt;0}$, then 
\begin{equation}\label{Alalapp}
\sum_{N \geq 1} E_A^C(N) \, x^N =\sum_{a\in A} \frac{x^{2a}}{1+x^a}+\frac{\sum_{a\in A} \frac{x^a}{(1+x^a)^2}}{1-\sum_{a \in A}\frac{x^a}{1+x^a}}.
\end{equation}
\end{corollary}

We would like to use the methodology in Hadjicostas~\cite{hadji123} (and that in Zhang and Hadjicostas~\cite{zhang2}) to derive a relationship between the numbers of CR-type cyclic Carlitz compositions of positive integers
with parts in a set $A$ and the numbers of C-type cyclic Carlitz compositions of positive integers with parts in $A$. Such formulas would help us derive generating functions for the numbers of CR-type cyclic Carlitz compositions of positive integers with parts in $A$ and such results would be reminiscent of the theory in Flajolet and Sedgewick~\cite{fla} and Flajolet and Soria~\cite{fla2}. 
The problem, however, is that we cannot use this theory directly without modifying the definitions of $E_A^C(N;K)$ and
$E_A^{CR}(N;K)$. To understand why, let us define the {\it period} $h$ of a circular (CR-type cyclic) composition $[(\lambda_1,\ldots,\lambda_K)]_{CR}$ of $N$ with length $K$ to be the length of the shortest subsequence of $\lambda_i$'s with consecutive indices that is able to reproduce $(\lambda_1,\ldots,\lambda_K)$ by repeating itself $K/h$ times. If we denote by $E^{CR}_A(N;K;h)$ the number of all CR-type cyclic Carlitz compositions of $N$ with length $K$, period $h$, and parts in $A$, a key desirable formula we would like to hold is that, for $1 \leq K \leq N$,
\begin{equation} \label{nokuthaba2}
E_A^{CR}\left(N;K;\frac{K}{d}\right)=E_A^{CR}\left(\frac{N}{d};\frac{K}{d};\frac{K}{d}\right) \quad \mbox{for all positive divisors $d$ of $\gcd(N,K)$.}
\end{equation}
The last formula would follow from the following fact (if it were true): every CR-type cyclic Carlitz composition of $N$ with length $K$, period $K/d$, and parts in $A$ can be partitioned into $d$ identical CR-type cyclic Carlitz compositions of $N/d$ with length $K/d$, period $K/d$ and parts in $A$. 

The above claim is always true except when $K|N$, $d=K&gt;1$ and $N/d \in A$. In this case, we get 
$$E_A^{CR}\left(N;K;\frac{K}{d}=1\right)=0 \neq 1 = E_A^{CR}\left(\frac{N}{d};\frac{K}{d}=1;\frac{K}{d}=1\right)$$
because in this paper, following Taylor~\cite{taylor1}, we make the convention that $[(n)]_{CR}$ is a (CR-type cyclic) Carlitz composition for each $n \in {\mathbb Z}_{&gt;0}$. 

To fix the problem, we define $\tilde{E}_A^C(N;K)=E_A^C(N;K)$ if $2 \leq K \leq N$, and 0 if $K=1$.
Similarly, we let $\tilde{E}_A^{CR}(N;K)=E_A^{CR}(N;K)$ if $2 \leq K \leq N$, and 0 if $K=1$. In such a case, equalities (\ref{nokuthaba2}) hold when $E_A^{CR}$ is replaced with $\tilde{E}_A^{CR}$. Note that
$$E_A^C(N)=\tilde{E}_A^C(N)+I(N \in A) \quad \mbox{and} \quad E_A^{CR}(N)=\tilde{E}_A^{CR}(N)+I(N \in A).$$
(Here, $\mbox{$I(x \in A)=1$ if $x \in A$, and 0 otherwise.}$)

Equations~(\ref{A123456}) and (\ref{Asanta1}) below express numbers of (modified) CR-type cyclic Carlitz compositions in terms of numbers of (modified) C-type cyclic Carlitz compositions. 

\begin{theorem}\label{shelfA1}
Let $N, K \in {\mathbb Z}_{&gt;0}$ with $1 \leq K \leq N$.
The (modified) number of CR-type cyclic Carlitz compositions of $N$ of length $K$ with parts in $A \subseteq {\mathbb Z}_{&gt;0}$ is given by
\begin{equation}\label{A123456}
\tilde{E}_A^{CR}(N;K)=\frac{1}{K} \sum_{s|\gcd(N,K)} \phi(s) \, \tilde{E}_A^{C}\left(\frac{N}{s}; \frac{K}{s}\right).
\end{equation}
Also, the total number of cyclic compositions (of any length) of $N$ with parts in $A$ is
\begin{equation}\label{Asanta1}
\tilde{E}_A^{CR}(N)=\frac{1}{N}\sum_{d|N} \phi(d) g_A\left(\frac{N}{d}\right),
\end{equation}
where 
\begin{equation}\label{nanaLL}
g_A(s)=s \sum_{k=1}^s \frac{\tilde{E}_A^C(s;k)}{k} \quad \mbox{for $s \in {\mathbb Z}_{&gt;0}$}.
\end{equation}
The generating function of $\tilde{E}_{A}^{CR}(N;K)$ is given by
$$\sum_{N,K \geq 1} \tilde{E}_A^{CR}(N;K)\; x^N y^K=\sum_{s\geq 1} \frac{\phi(s)}{s} G_A(x^s,y^s),$$
where 
\begin{equation}\label{sedraxP}
G_A(x,y)=-\sum_{a\in A} \log(1+x^ay)-\log\left(1-\sum_{a\in A} \frac{x^ay}{1+x^ay}\right).
\end{equation}
\end{theorem}

We let $F_A^{CR}(N;K)$ denote the number of {\it symmetrical CR-type cyclic Carlitz compositions} of $N$ with $K$ parts in the set $A \subseteq {\mathbb Z}_{&gt;0}$. The following result gives a formula and the bivariate generating function for these numbers. To derive the latter, we need to use Theorem~\ref{kentucky} above that gives the bivariate generating function of the number of type-II linear palindromic Carlitz compositions. 

\begin{theorem}\label{shelfA2}
Let $N, K \in {\mathbb Z}_{&gt;0}$ with $1 \leq K \leq N$. Then the number of symmetrical CR-type cyclic Carlitz compositions of $N$ with $K$ parts in the set $A \subseteq {\mathbb Z}_{&gt;0}$ is given by the formula
$$F_A^{CR}(N;K)=\begin{cases}
\frac{F_A^{L_2}(N;K)}{2}, &amp; \mbox{if $2 \leq K \leq N$};\\
I(N \in A), &amp; \mbox{if $K=1$}.
\end{cases}$$
(Thus, if $K$ is an odd integer $\geq 3$, then $F_A^{CR}(N;K)=0$.) The corresponding generating function is
\begin{equation}\label{laos2}
\sum_{N,K \geq 1} F_A^{CR}(N;K) \, x^N y^K=
\frac{\left(\sum_{a\in A} \frac{x^ay}{1+x^{2a}y^2}\right)^2}{2(1-\sum_{a \in A} \frac{x^{2a}y^2}{1+x^{2a}y^2})}-\frac{1}{2}\sum_{a \in A} \frac{x^{2a}y^2}{1+x^{2a}y^2}+\sum_{a \in A} x^a y.
\end{equation}
\end{theorem}

Letting $y=1$ in the above bivariate generating function~(\ref{laos2}), we get the following corollary.

\begin{corollary}\label{Mppp}
Let  $A \subseteq {\mathbb Z}_{&gt;0}$. Then the total number of symmetrical CR-type cyclic Carlitz compositions of $N \in {\mathbb Z}_{&gt;0}$ with parts in the set $A$ is given by the formula 
$$F_A^{CR}(N)= 
\frac{F_A^{L_2}(N)+I(N \in A)}{2},$$
while the corresponding generating function is
$$\sum_{N \geq 1} F_A^{CR}(N) \, x^N=
\frac{\left(\sum_{a\in A} \frac{x^a}{1+x^{2a}}\right)^2}{2(1-\sum_{a \in A} \frac{x^{2a}}{1+x^{2a}})}-\frac{1}{2}\sum_{a \in A} \frac{x^{2a}}{1+x^{2a}}+\sum_{a \in A} x^a.$$
\end{corollary}

Finally, we let $E_A^D(N;K)$ denote the number of {\it dihedral Carlitz compositions} of $N$ with length $K$ and parts in $A \subseteq {\mathbb Z}_{&gt;0}$. We then have the following result.

\begin{theorem}\label{shelfA3}
If $N, K \in {\mathbb Z}_{&gt;0}$, with $1 \leq K \leq N$, and $A \subseteq {\mathbb Z}_{&gt;0}$, then 
$$E_A^{D}(N;K)=\frac{E^{CR}_A(N;K)+F_A^{CR}(N;K)}{2}=\begin{cases}
\frac{2E_A^{CR}(N;K)+F_A^{L_2}(N;K)}{4}, &amp; \mbox{if $2 \leq K \leq N$};\\
I(N \in A), &amp; \mbox{if $K=1$}.
\end{cases}$$
\end{theorem}

It is possible to write down the bivariate generating function of $E_A^D(N;K)$ by using Theorems~\ref{shelfA1}--\ref{shelfA3}. We omit it because it is too complicated.

\begin{corollary}\label{shelfA5}
If $N \in {\mathbb Z}_{&gt;0}$ and $A \subseteq {\mathbb Z}_{&gt;0}$, then 
$$E_A^{D}(N)=\frac{E^{CR}_A(N)+F_A^{CR}(N)}{2}=\frac{2E_A^{CR}(N)+F_A^{L_2}(N)+I(N \in A)}{4}.$$
\end{corollary}

The organization of the paper is as follows. In Section~\ref{examples} we give examples that illustrate the definitions and results of the paper, while in Section~\ref{proofs} we give the proofs of the results of the paper. Finally, in Section~\ref{final2}, we discuss some future research proposals related to the papers by Bender and Canfield~\cite{bender1,bender2,bender3} and Bender, Canfield, and Gao~\cite{bender4}.

\section{Examples} \label{examples}

In this section, we illustrate the different definitions and results from Section~\ref{sone001x} of the paper. 
In Table~\ref{newdoi}, we enumerate all the compositions of $N=5$ with parts in $A={\mathbb Z}_{&gt;0}$, and we categorize
them on whether they are palindromic (of either type), Carlitz, etc. In addition, we categorize equivalence classes of these compositions on whether they are cyclic, dihedral, symmetrical, etc.

\begin{table}[!ht]
\begin{center}
\begin{tabular}{|l||l|}\hline
Description &amp; Compositions (or equivalence classes of compositions) \\ \hline\hline
with length 1 &amp; $[(5)]_{CR}$ \\ \hline
with length 2 &amp; $[(1,4)]_{CR}=[(4,1)]_{CR},$ $[(2,3)]_{CR}=[(3,2)]_{CR}$\\ \hline
with length 3 &amp; $[(1,1,3)]_{CR}=[(3,1,1)]_{CR}=[(1,3,1)]_{CR},$\\ 
&amp; $[(1,2,2)]_{CR}=[(2,1,2)]_{CR}=[(2,2,1)]_{CR}$ \\ \hline
with length 4 &amp; $[(1,1,1,2)]_{CR}=[(2,1,1,1)]_{CR}=[(1,2,1,1)]_{CR}=[(1,1,2,1)]_{CR}$ \\ \hline
with length 5 &amp; $[(1,1,1,1,1)]_{CR}$ \\ \hline \hline
$c_{{\mathbb Z}_{&gt;0}}^L(N=5)=16$ &amp; see above \\ \hline
$c_{{\mathbb Z}_{&gt;0}}^{CR}(N=5)=7$ &amp; see above \\ \hline
$P_{{\mathbb Z}_{&gt;0}}^{L_1}(N=5)=4$ &amp; (5), (1,3,1), (2,1,2), (1,1,1,1,1) \\ \hline
$P_{{\mathbb Z}_{&gt;0}}^{L_2}(N=5)=10$ &amp; $(5), (1,4), (4,1), (2,3),(3,2),(3,1,1),(1,2,2),$\\ 
                                   &amp; $(2,1,1,1), (1,1,2,1), (1,1,1,1,1)$ \\\hline
$P_{{\mathbb Z}_{&gt;0}}^{CR}(N=5)=7$ &amp; $[(5)]_{CR}, [(1,4)]_{CR}, [(2,3)]_{CR}, [(1,3,1)]_{CR}, [(2,1,2)]_{CR},$ \\ 
                                  &amp; $[(2,1,1,1)]_{CR}, [(1,1,1,1,1)]_{CR}$ \\ \hline
$c_{{\mathbb Z}_{&gt;0}}^D(N=5)=7$ &amp; same as above for $P^{CR}_{{\mathbb Z}_{&gt;0}}(N=5)$ with `CR' replaced with `D' \\ \hline
$E^L_{{\mathbb Z}_{&gt;0}}(N=5)=7$ &amp; $(5), (1,4), (4,1), (2,3),(3,2), (1,3,1),(2,1,2)$ \\ \hline
$E_{{\mathbb Z}_{&gt;0}}^{C}(N=5)=5$ &amp; $(5), (1,4), (4,1), (2,3),(3,2)$ \\ \hline
$E_{{\mathbb Z}_{&gt;0}}^{CR}(N=5)=3$ &amp; $[(5)]_{CR}, [(1,4)]_{CR}, [(2,3)]_{CR}$ \\ \hline
$E_{{\mathbb Z}_{&gt;0}}^{D}(N=5)=3$ &amp; $[(5)]_{D}, [(1,4)]_{D}, [(2,3)]_{D}$ \\ \hline
$F_{{\mathbb Z}_{&gt;0}}^{L_1}(N=5)=3$ &amp; $(5), (1,3,1), (2,1,2)$ \\ \hline
$F_{{\mathbb Z}_{&gt;0}}^{L_2}(N=5)=5$ &amp; $(5), (1,4), (4,1), (2,3), (3,2)$ \\ \hline
$F_{{\mathbb Z}_{&gt;0}}^{CR}(N=5)=3$ &amp; $[(5)]_{CR}, [(1,4)]_{CR}, [(2,3)]_{CR}$\\ \hline
\end{tabular}
\end{center}
\caption{Various kinds of compositions when $N=5$ and $A={\mathbb Z}_{&gt;0}$}\label{newdoi}
\end{table}

Note that, by coincidence, all dihedral compositions of $N=5$ are also symmetrical CR-type cyclic as well. (Note that 
$c_{{\mathbb Z}_{&gt;0}}^{D}(N=5)=7=P^{CR}_{{\mathbb Z}_{&gt;0}}(N=5)$.) In general, however, that is not the case. For example, if $N=6$, then 
$$[(1,2,3)]_{CR}=\{(1,2,3),(2,3,1),(3,1,2)\},$$ while
$$ [(1,2,3)]_D=\{(1,2,3),(2,3,1),(3,1,2),(3,2,1),(1,3,2),(2,1,3)\}.$$

\begin{table}[!ht]
\begin{center}
\begin{tabular}{|r||r|r|r||r|r|r|}\hline
$N$ &amp; $F^{L_1}_{{\mathbb Z}_{&gt;0}}(N)$ &amp; $F_{{\mathbb Z}_{&gt;0}}^{L_2}(N)$ &amp; $F^{CR}_{{\mathbb Z}_{&gt;0}}(N)$  &amp; $E^{C}_{{\mathbb Z}_{&gt;0}}(N)$ &amp; $E_{{\mathbb Z}_{&gt;0}}^{CR}(N)$ &amp; $E^{D}_{{\mathbb Z}_{&gt;0}}(N)$ \\ \hline
1  &amp; 1 &amp; 1 &amp; 1 &amp; 1 &amp; 1 &amp; 1 \\ \hline
2  &amp; 1 &amp; 1 &amp; 1 &amp; 1 &amp; 1 &amp; 1 \\ \hline
3  &amp; 1 &amp; 3 &amp; 2 &amp; 3 &amp; 2 &amp; 2 \\ \hline
4  &amp; 2 &amp; 3 &amp; 2 &amp; 3 &amp; 2 &amp; 2 \\ \hline
5  &amp; 3 &amp; 5 &amp; 3 &amp; 5 &amp; 3 &amp; 3  \\ \hline
6  &amp; 2 &amp; 7 &amp; 4  &amp; 13 &amp; 6 &amp; 5 \\ \hline
7  &amp; 5 &amp; 9 &amp; 5  &amp; 17 &amp; 7 &amp; 6\\ \hline
8  &amp; 5 &amp; 13 &amp; 7  &amp; 29 &amp; 11 &amp; 9 \\ \hline
9  &amp; 7 &amp; 19 &amp; 10  &amp; 55 &amp; 18 &amp; 14\\ \hline
10 &amp; 10 &amp; 21 &amp; 11 &amp; 99 &amp; 29 &amp; 20 \\ \hline
11 &amp; 14 &amp; 31 &amp; 16 &amp; 161 &amp; 42 &amp; 29 \\ \hline
12 &amp; 14 &amp; 45 &amp; 23 &amp; 293 &amp; 73 &amp; 48\\ \hline
13 &amp; 25 &amp; 53 &amp; 27 &amp; 507  &amp; 111 &amp; 69  \\ \hline
14 &amp; 26 &amp; 73 &amp; 37 &amp; 881 &amp; 183 &amp; 110 \\ \hline
15 &amp; 42 &amp; 101 &amp; 51 &amp; 1561  &amp; 299 &amp; 175  \\ \hline
16 &amp; 48 &amp; 129  &amp; 65 &amp; 2727 &amp; 491 &amp; 278  \\ \hline
17 &amp; 75 &amp; 171 &amp; 86  &amp; 4743 &amp; 796 &amp; 441\\ \hline
18 &amp; 79 &amp; 233 &amp; 117 &amp; 8337 &amp; 1333 &amp; 725  \\ \hline
19 &amp; 132 &amp; 295  &amp; 148 &amp; 14579 &amp; 2188 &amp; 1168  \\ \hline
20 &amp; 142 &amp; 407  &amp; 204 &amp; 25497 &amp; 3652 &amp; 1928 \\ \hline
\end{tabular}
\end{center}
\caption{Evaluations of $F_A^{L_1}(N)$, $F_A^{L_2}(N)$, $F_A^{CR}(N)$ (numbers of palindromic/symmetric Carlitz compositions) and  $E_A^{C}(N)$, $E_A^{CR}(N)$ and $E_A^{D}(N)$ (numbers of cyclic/dihedral Carlitz compositions) for $N=1(1)20$ when $A={\mathbb Z}_{&gt;0}$}\label{ononon22}
\end{table}

In Table~\ref{ononon22}, we evaluate the following quantities from $N=1$ to $N=20$ when $A={\mathbb Z}_{&gt;0}$:
\begin{itemize}
    \item $F_A^{L_1}(N)=$ total number of type I palindromic Carlitz compositions of $N$ (this is sequence \seqnum{A239327} in OEIS);
    \item $F_A^{L_2}(N)=$ total number of type II palindromic Carlitz compositions of $N$;
    \item $F_A^{CR}(N)=$ total number of symmetrical CR-type cyclic Carlitz compositions of $N$;
    \item $E_A^C(N)=$ total number of C-type cyclic Carlitz compositions of $N$ (this is sequence \seqnum{A212322} in 
OEIS);
\item $E_A^{CR}(N)=$ total number of CR-type cyclic Carlitz compositions of $N$ (this is sequence \seqnum{A106369} in OEIS);
\item $E_A^D(N)=$ total number of dihedral Carlitz compositions of $N$.
\end{itemize}

Next we illustrate Theorems~\ref{ANO2} and \ref{ANO3}. Theorem~\ref{ANO2} implies that
\begin{small}
\begin{eqnarray*}
\sum_{N \geq 1}E_A^{L}(N;K=1)\, x^N &amp; = &amp; \sum_{a \in A} x^a \quad \mbox{with ${\cal L}_1=\{(1)\}$};\\ 
\sum_{N \geq 1}E_A^{L}(N;K=2)\, x^N &amp; = &amp; \left(\sum_{a \in A} x^a\right)^2-\sum_{a \in A} x^{2a} \quad \mbox{with ${\cal L}_2=\{(2,0),(0,1)\}$};\\
\sum_{N \geq 1}E_A^{L}(N;K=3)\, x^N &amp; = &amp; \left(\sum_{a \in A} x^a\right)^3-2 \left(\sum_{a \in A} x^{a}\right) \left(\sum_{a \in A} x^{2a}\right)+\sum_{a \in A} x^{3a}\\
     &amp; &amp; \mbox{with ${\cal L}_3=\{(3,0,0),(1,1,0),(0,0,1)\}$};\\ 
     \sum_{N \geq 1}E_A^{L}(N;K=4)\, x^N &amp; = &amp; \left(\sum_{a \in A} x^a\right)^4-3 \left(\sum_{a \in A} x^{a}\right)^2 \left(\sum_{a \in A} x^{2a}\right)\\ &amp; &amp; +2\left(\sum_{a \in A} x^a\right) \left(\sum_{a \in A} x^{3a}\right)+\left(\sum_{a \in A} x^{2a}\right)^2-\sum_{a \in A} x^{4a}\\ 
     &amp; &amp; \mbox{with ${\cal L}_4=\{(4,0,0,0),(2,1,0,0),(1,0,1,0),(0,2,0,0),(0,0,0,1)\}$.}
\end{eqnarray*}
\end{small}
Finally, Theorem~\ref{ANO3} implies 
\begin{small}
\begin{eqnarray*}
\sum_{N \geq 1}F_A^{L_1}(N;K=1)\, x^N &amp; = &amp; \sum_{a \in A} x^a \quad \mbox{with $\rho=0$ and ${\cal M}_0=\{()\};$}\\ 
\sum_{N \geq 1}F_A^{L_1}(N;K=3)\, x^N &amp; = &amp;-\sum_{a \in A} x^{3a}+\left(\sum_{a \in A} x^a\right)\left(\sum_{a \in A} x^{2a}\right) \quad \mbox{with $\rho=1$ and ${\cal M}_1=\{(0),(1)\}$};\\
\sum_{N \geq 1}F_A^{L_1}(N;K=5)\, x^N &amp; = &amp; \sum_{a \in A} x^{5a}-\left(\sum_{a \in A} x^{3a}\right)\left(\sum_{a \in A} x^{2a}\right)+\left(\sum_{a \in A} x^a\right)\left(\sum_{a \in A} x^{2a}\right)^2\\ &amp; &amp; -\left(\sum_{a \in A} x^a\right)\left(\sum_{a \in A} x^{4a}\right) \\ &amp; &amp; \mbox{with $\rho=2$ and ${\cal M}_2=\{(0,0),(1,0),(2,0),(0,1)\}.$}
\end{eqnarray*}
\end{small}

\section{Proofs}~\label{proofs}

If $K,b_1,\ldots,b_K \in {\mathbb Z}_{&gt;0}$, define the {\it multinomial coefficient}
$${b_1+\cdots+b_K \choose b_1,\ldots,b_K}=\frac{(b_1+\cdots+b_K)!}{b_1! \cdots b_K!}.$$
We recall a result about multinomial coefficients that is used in the proofs of Theorems~\ref{ANO2} and \ref{ANO3} later in the paper. 
If $K,\beta_1,\ldots,\beta_K \in {\mathbb Z}_{&gt;0}$ and $N=\sum_{s=1}^K \beta_s,$ then
\begin{equation}\label{pytha}
{N \choose \beta_1,\ldots,\beta_K}=\sum_{s=1}^K {N-1 \choose \beta_1,\ldots,\beta_{s-1},\beta_s-1,\beta_{s+1},\ldots,\beta_K}.
\end{equation}


\begin{proof}[{\bf Proof of Theorem~\ref{ANO2}}]
We proceed by induction on $K$. For $K=1$, equation~(\ref{BABA1}) holds because
$$\sum_{N \geq 1} E_A^L(N;K=1)\, x^N=\sum_{a \in A} x^a=\frac{1! (-1)^{1+1}}{1!} \left(\sum_{a \in A} x^{1a}\right)^1.$$ Let $M \geq 2$, and assume equation~(\ref{BABA1}) holds for all positive integers $K&lt;M$. Define
$$B_K(x)=\sum_{N \geq 1} E_A^L(N;K)\, x^N.$$
It follows from equation~(\ref{starA}) that
$$\left(1+\sum_{K \geq 1} B_K(x) \, y^K\right)\left(1+\sum_{a \in A} \sum_{s=1}^{\infty} (-1)^s x^{sa} y^s\right)=1,$$ 
and hence,
\begin{small}
$$
\sum_{K=1}^{\infty} B_K(x)\, y^K+\sum_{s=1}^{\infty} (-1)^s \left(\sum_{a \in A} x^{sa}\right) y^s+
\left(\sum_{K=1}^{\infty} B_K(x)\, y^K\right)\left(\sum_{s=1}^{\infty} (-1)^s \left(\sum_{a \in A} x^{sa}\right)y^s\right)=0.$$
\end{small}

It follows that, for $K=M$,
\begin{equation}\label{MMM1}
B_M(x)=(-1)^{M+1} \sum_{a \in A} x^{Ma}+\sum_{\ell=1}^{M-1} B_{\ell}(x) (-1)^{M-\ell+1} \left(\sum_{a \in A} x^{(M-\ell) a}\right).
\end{equation}
We conclude from equation~(\ref{BABA1}) that, for $\ell=1,\ldots,M-1$,
\begin{equation}\label{MMM2}
B_{\ell}(x)=\sum_{{\cal L}_{\ell}} \frac{\left(\sum_{s=1}^{\ell} \alpha_{\ell,s}\right)!}{\alpha_{\ell,1}! \cdots
\alpha_{\ell,\ell}!}(-1)^{\sum_{s=1}^{\ell} \alpha_{\ell,s}+\ell}
\prod_{i=1}^{\ell} \left(\sum_{a \in A} x^{ia}\right)^{\alpha_{\ell,i}},
\end{equation}
where ${\cal L}_{\ell}=\{(\alpha_{\ell,1},\ldots,\alpha_{\ell,\ell}) \in {\mathbb Z}_{\geq 0}^{\ell}: \, \sum_{s=1}^{\ell} s\alpha_{\ell,s}=\ell\}$. Assume 
$$\mbox{$\alpha_{\ell,s}=0$ for $\ell+1 \leq s \leq M$},$$
and define
$$\widetilde{\cal L}_{\ell}=\{(\alpha_{\ell,1},\ldots,\alpha_{\ell,\ell},0,\ldots,0) \in {\mathbb Z}_{\geq 0}^{M}: \, \sum_{s=1}^{\ell} s\alpha_{\ell,s}=\ell\}.$$
Then, equations~(\ref{MMM1}) and (\ref{MMM2}) imply
\begin{small}
\begin{eqnarray}
B_M(x) &amp; = &amp; \sum_{\ell=1}^{M-1} \sum_{\widetilde{\cal L}_{\ell}} \frac{\left(\sum_{s=1}^{M} \alpha_{\ell,s}\right)!}{\alpha_{\ell,1}! \cdots
\alpha_{\ell,M}!}(-1)^{\sum_{s=1}^{M} \alpha_{\ell,s}+M+1}
\prod_{i=1 \atop i \neq M-\ell}^{M} \left(\sum_{a \in A} x^{ia}\right)^{\alpha_{\ell,i}}
\left(\sum_{a \in A} x^{(M-\ell)a}\right)^{\alpha_{\ell,M-\ell}+1} \nonumber \\ 
&amp; &amp; +(-1)^{M+1}\sum_{a \in A}x^{Ma}.\label{TASIA}
\end{eqnarray}
\end{small}
We seek to prove that
\begin{equation}\label{MMM4}
B_M(x)=\sum_{{\cal L}_{M}} \frac{\left(\sum_{s=1}^{M} \alpha_{M,s}\right)!}{\alpha_{M,1}! \cdots
\alpha_{M,M}!}(-1)^{\sum_{s=1}^{M} \alpha_{M,s}+M}
\prod_{i=1}^{M} \left(\sum_{a \in A} x^{ia}\right)^{\alpha_{M,i}}.
\end{equation}
The term $(-1)^{M+1}\sum_{a \in A}x^{Ma}$ in equation~(\ref{TASIA}) corresponds to the case $$\mbox{$\alpha_{M,1}=\cdots=\alpha_{M,M-1}=0$ and $\alpha_{M,M}=1$}.$$
Hence, for all other elements (cases) in ${\cal L}_M$ we have $\alpha_{M,M}=0$.

For $\bba=(\alpha_{M,1},\dots,\alpha_{M,M-1},0) \in {\cal L}_M$, for which of course we have $\sum_{s=1}^{M-1} s \alpha_{M,s}=M$, in the double sum in equation~(\ref{TASIA}), we need to find the sum of the coefficients that correspond to the product (term) $\prod_{s=1}^{M-1} \left(\sum_{a \in A} x^{sa}\right)^{\alpha_{M,s}}.$ We prove below that this sum of coefficients equals the coefficient of this term given in equation~(\ref{MMM4}) above.

We define $$D(\bba)=\{\ell \in \{1,2,\ldots,M-1\}: \, \alpha_{M,M-\ell} \geq 1\}.$$
By equation~(\ref{pytha}), 
\begin{equation}\label{chro}
\frac{\left(\sum_{s=1}^{M-1} \alpha_{M,s}\right)!}{\prod_{s=1}^{M-1} \alpha_{M,s}!}=
\sum_{\ell \in D({\small \bba})} \left( \frac{\left(\displaystyle{\sum_{s=1}^{M-1}} \alpha_{M,s}-1\right)!}{\left(\displaystyle{\prod_{s=1 \atop s \neq M-\ell}^{M-1}} \alpha_{M,s}!\right)\left(\alpha_{M,M-\ell}-1\right)!}\right).
\end{equation}
If $\ell \in D(\bba)$, then 
$$\sum_{s=1 \atop s \neq M-\ell}^{M-1} s\alpha_{M,s}+(M-\ell)(\alpha_{M,M-\ell}-1)=\ell,$$
which implies $\alpha_{M,\ell+1}=\cdots=\alpha_{M,M-1}=0;$ i.e., 
$$\bba^{(\ell)}=(\alpha_{M,1},\ldots,\alpha_{M,M-\ell-1},\alpha_{M,M-\ell}-1,\alpha_{M,M-\ell+1},\ldots,\alpha_{M,M-1},0)\in {\widetilde{\cal L}}_{\ell}.$$

On the other hand, let $\ell \in \{1,2,\ldots,M-1\}$ and $\bbb^{(\ell)}=(\beta_{\ell,1},\ldots,\beta_{\ell,\ell},0,\ldots,0) \in \widetilde{L}_{\ell}$ with $\beta_{\ell,s}=0$ for $\ell+1 \leq s \leq M$, and assume that, in~(\ref{TASIA}),
$$\prod_{i=1 \atop i \neq M-\ell}^{M} \left(\sum_{a \in A} x^{ia}\right)^{\beta_{\ell,i}}
\left(\sum_{a \in A} x^{(M-\ell)a}\right)^{\beta_{\ell,M-\ell}+1}=\prod_{s=1}^{M-1} \left(\sum_{a \in A} x^{sa}\right)^{\alpha_{M,s}}.$$
Hence, $\beta_{\ell,s}=\alpha_{M,s}$ for $1 \leq s \neq M-\ell \leq M-1$, $\beta_{\ell,M-\ell}+1=\alpha_{M,M-\ell} \geq 1,$ $\beta_{\ell,M}=\alpha_{M,M}=0$, and $\ell \in D(\bba).$ In addition, 
\begin{equation}\label{TASS}
\sum_{s=1}^M \beta_{\ell,s}+M+1=\sum_{s=1}^M \alpha_{M,s}+M.
\end{equation}

We conclude from equations~(\ref{chro}) and (\ref{TASS}) that the sum of the coefficients that correspond to the product $\prod_{s=1}^{M-1} \left(\sum_{a \in A} x^{sa}\right)^{\alpha_{M,s}}$ in equation~(\ref{TASIA}) is equal to $\frac{\left(\sum_{s=1}^{M-1} \alpha_{M,s}\right)!}{\prod_{s=1}^{M-1} \alpha_{M,s}!}$. This establishes equation~(\ref{MMM4}) and the induction step is complete.
\end{proof}


\begin{proof}[{\bf Proof of Theorem~\ref{ANO3}}]
We prove~(\ref{KKKppp}) by induction on $\rho$. For $\rho=0$, equation~(\ref{KKKppp}) holds with ${\cal M}_0=\{()\}$ (set with the empty list), $\sum_{i=1}^0 \beta_i=0$ (an empty sum equals 0) and $\prod_{i=1}^0 \gamma_i=1$ (an empty product equals 1):
$$\sum_{N \geq 1} F_A^{L_1}(N;1)\, x^N=\sum_{a \in A} x^a=\frac{0!(-1)^{0+0}}{1}\left(\sum_{a \in A} x^{(2\cdot 0+1-0)a}\right)\cdot 1.$$

Let $r \geq 1$, and assume equation~(\ref{KKKppp}) holds for all nonnegative integers $\rho &lt;r$. Let 
$$C_{\rho}(x)=\sum_{N \geq 1} F_A^{L_1}(N;2\rho+1)\, x^N.$$
It follows from equation~(\ref{rema1}) that
$$\left(\sum_{\rho=0}^{\infty} C_{\rho}(x)\, y^{2\rho+1}\right) \left(1+\sum_{a \in A} \sum_{s=1}^{\infty} (-1)^s x^{2as} y^{2s}\right)=\sum_{a \in A} \sum_{s=0}^{\infty} (-1)^{s}x^{(2s+1)a}y^{2s+1}.$$
Therefore, 
\begin{eqnarray*}
\sum_{s=0}^{\infty} (-1)^s \left(\sum_{a \in A} x^{(2s+1)a}\right) y^{2s+1} &amp; = &amp; \left(\sum_{\rho=0}^{\infty} C_{\rho}(x)\, y^{2\rho+1}\right) \left(\sum_{s=1}^{\infty} (-1)^s \left(\sum_{a \in A} x^{2sa}\right)y^{2s}\right)\\ 
&amp; &amp; +\sum_{\rho=0}^{\infty} C_{\rho}(x)\, y^{2\rho+1}.
\end{eqnarray*}
Hence, when $\rho=r$,
\begin{equation}\label{sara1}
C_r(x)=\sum_{\sigma=0}^{r-1} C_{\sigma}(x) (-1)^{r-\sigma+1} \left(\sum_{a \in A} x^{2(r-\sigma)a}\right)+(-1)^r \sum_{a \in A} x^{(2r+1)a}.
\end{equation}
We let $D_1$ and $D_2$ denote the two terms on the right-hand side of the above equation, i.e., $C_r(x)=D_1+D_2$.
Next, note that the set ${\cal M}_{\rho}$, defined by equation~(\ref{tror}), can be written as 
$${\cal M}_{\rho}=\bigcup_{k=0}^{\rho} {\cal K}_{\rho,k}, \quad \mbox{where ${\cal K}_{\ell,k}=\{(\alpha_{\ell,1},\ldots,\alpha_{\ell,\ell}) \in {\mathbb Z}_{\geq 0}^{\ell}: \, \sum_{s=1}^{\ell} s \alpha_{\ell,s}=k\}.$}$$
If $0 \leq k \leq \ell,$ then
$${\cal K}_{\ell,k}=\{(\alpha_{\ell,1},\ldots,\alpha_{\ell,k},0,\ldots,0) \in {\mathbb Z}_{\geq 0}^{\ell}: \,
\sum_{s=1}^k s \alpha_{\ell,s}=k\}.$$
In particular, ${\cal K}_{\ell,0}=\{(0,\ldots,0)\},$ where the list inside the set has $\ell$ zeros.

By the induction hypothesis, we conclude from equation~(\ref{KKKppp}) that, for $\rho=0,1,\ldots,r-1$,
\begin{equation}\label{nyxi}
C_{\rho}(x)=\sum_{k=0}^{\rho} \left(\sum_{a \in A}x^{\left(2\rho+1-2k\right)a} \right)\sum_{{\cal K}_{\rho,k}} \frac{(\sum_{s=1}^{\rho} \alpha_{\rho,s})! (-1)^{\sum_{s=1}^{\rho}\alpha_{\rho,s}+\rho}}{\prod_{s=1}^{\rho} \alpha_{\rho,s}!}  \prod_{s=1}^{\rho}\left(\sum_{a \in A} x^{2s a} \right)^{\alpha_{\rho,s}}.
\end{equation}
In equation~(\ref{nyxi}), we may replace the sum $\displaystyle{\sum_{{\cal K}_{\rho,k}}}$ with $\displaystyle{\sum_{\widetilde{\cal K}_{\rho,k}}},$ where
$$\widetilde{\cal K}_{\rho,k}=\{(\alpha_{\rho,1},\ldots,\alpha_{\rho,k},0,\ldots,0)\in {\mathbb Z}_{\geq 0}^r:
\, \sum_{s=1}^k s \alpha_{\rho,s}=k\};$$
i.e., we assume $\alpha_{\rho,s}=0$ for $0 \leq \rho \leq r-1$ and $\rho+1 \leq s \leq r$. (Of course, for $0 \leq k \leq \rho$, we also have $\alpha_{\rho,s}=0$ for $k+1 \leq s \leq \rho$.) Also, we may replace $\sum_{s=1}^{\rho} \alpha_{\rho,s}$ with $\sum_{s=1}^r \alpha_{\rho,s}$ and $\prod_{s=1}^{\rho}$ with $\prod_{s=1}^r$.

We wish to prove that 
\begin{eqnarray}
C_{r}(x) &amp; = &amp; \sum_{m=0}^{r} \left(\sum_{a \in A} x^{\left(2r+1-2m\right)a} \right)\sum_{{\cal K}_{r,m}} \frac{(\sum_{s=1}^{r} \alpha_{r,s})! (-1)^{\sum_{s=1}^{r}\alpha_{r,s}+r}}{\prod_{s=1}^{r} \alpha_{r,s}!} \prod_{s=1}^{r}\left(\sum_{a \in A} x^{2s a} \right)^{\alpha_{r,s}}\\ 
&amp; = &amp; \sum_{m=1}^{r} \left(\sum_{a \in A} x^{\left(2r+1-2m\right)a} \right)\sum_{{\cal K}_{r,m}} \frac{(\sum_{s=1}^{r} \alpha_{r,s})! (-1)^{\sum_{s=1}^{r}\alpha_{r,s}+r}}{\prod_{s=1}^{r} \alpha_{r,s}!} \prod_{s=1}^{r}\left(\sum_{a \in A} x^{2s a} \right)^{\alpha_{r,s}}\nonumber \\ 
&amp; &amp; + (-1)^r \sum_{a \in A} x^{(2r+1)a}.\label{VUW}
\end{eqnarray}
We let $D_3$ and $D_2$ denote the two terms on the right-hand side of equation~(\ref{VUW}). (Term $D_2$ appears in equation~(\ref{sara1}) as well). Equations~(\ref{sara1}) and~(\ref{nyxi}) yield
\begin{equation}\label{TATA1}
D_1=\sum_{\sigma=0}^{r-1} \sum_{k=0}^{\sigma} \left(\sum_{a \in A} x^{(2\sigma+1-2k)a}\right) L(\sigma,k,r),
\end{equation}
where
\begin{small}
\begin{equation}\label{TATA2}
L(\sigma,k,r)=
\sum_{\widetilde{\cal K}_{\sigma,k}}
\frac{\left(\sum_{s=1}^{r} \alpha_{\sigma,s}\right)! (-1)^{\sum_{s=1}^r \alpha_{\sigma,s}+r+1}}{\prod_{s=1}^r \alpha_{\sigma,s}!}\prod_{s=1 \atop s \neq r-\sigma}^r \left(\sum_{a \in A} x^{2sa}\right)^{\alpha_{\sigma,s}}\left(\sum_{a \in A} x^{2(r-\sigma)a}\right)^{\alpha_{\sigma,r-s}+1}.
\end{equation}
\end{small}

To finish the inductive step, we need to prove that $D_1=D_3$. To achieve that, we need to prove that the coefficient of the term $$\left(\sum_{a \in A} x^{(2r+1-2m)a}\right) \prod_{s=1}^{r} \left(\sum_{a \in A} x^{2sa}\right)^{\alpha_{r,s}}, \quad \mbox{for fixed $m \in \{1,\ldots,r\}$ and $(\alpha_{r,1},\ldots,\alpha_{r,r}) \in {\cal K}_{r,m}$},$$
in the quantity $D_3$ in equation~(\ref{VUW}), equals the sum of the coefficients of the same term in quantity $D_1$ in equations~(\ref{TATA1}) and~(\ref{TATA2}).

By matching coefficients, one can see from equations~(\ref{VUW})-(\ref{TATA2}) that we need to prove that
\begin{equation}\label{prepre}
\frac{\left(\sum_{s=1}^r \alpha_{r,s}\right)!(-1)^{\sum_{s=1}^r \alpha_{r,s}+r}}{\prod_{s=1}^r \alpha_{r,s}!}=\sum_{k=0}^{r-1} \left(\frac{\left(\sum_{s=1}^r \alpha_{\sigma(k),s}\right)!(-1)^{\sum_{s=1}^r \alpha_{\sigma(k),s}+r+1}}{\prod_{s=1}^r \alpha_{\sigma(k),s}!}\right),
\end{equation}
for $\sigma(k)=k+r-m$ with $0 \leq k \leq \sigma(k) \leq r-1$ and 
$$\alpha_{r,s}=\begin{cases}
\alpha_{\sigma(k),s}=\alpha_{k+r-m,s}, &amp; \mbox{if $s \neq r-\sigma(k)=m-k$};\\
\alpha_{\sigma(k),s}+1=\alpha_{k+r-m,s}+1, &amp; \mbox{if $s = r-\sigma(k)=m-k$}
\end{cases}$$
with $\sum_{s=1}^r s \alpha_{r,s}=m$ and $\sum_{s=1}^r s \alpha_{\sigma(k),s}=\sum_{s=1}^r s \alpha_{k+r-m,s}=k.$ Note also that $0 \leq k \leq m-1$. In addition, $\alpha_{r,s}=0$ for $m+1 \leq s \leq r$. Let
$$\bba=(\alpha_{r,1},\ldots,\alpha_{r,r}).$$
Similarly to the proof of Theorem~\ref{ANO2}, we define
$$E(\bba)=\{k \in \{0,1,\ldots,m-1\}: \, \alpha_{r,m-k} \geq 1\}.$$
Since $0!=1$ and
$$\sum_{s=1}^r \alpha_{r,s}+r=\sum_{s=1}^r \alpha_{\sigma(k),s}+r+1,$$
equation~(\ref{prepre}) is equivalent to
\begin{equation}\label{trellos}
\frac{\left(\sum_{s=1}^r \alpha_{r,s}\right)!}{\prod_{s=1}^r \alpha_{r,s}!}=\sum_{k \in E(\bba)} \left(\frac{\left(\displaystyle{\sum_{s=1}^m} \alpha_{r,s}-1\right)!}{\left(\displaystyle{\prod_{s=1 \atop s \neq m-k}^m} \alpha_{r,s}!\right) (\alpha_{r,m-k}-1)!}\right).
\end{equation}
Equation~(\ref{trellos}) follows from equation~(\ref{pytha}), and the inductive step is complete.~\end{proof}

The following lemma is needed in the proof of Theorem~\ref{kentucky}.

\begin{lemma}\label{reka}
Let $N,K,\rho \in {\mathbb Z}_{\geq 0}$ with $1 \leq K=2\rho+2 \leq N$ and $A \subseteq {\mathbb Z}_{&gt;0}$ be given. Then 
\begin{eqnarray}
F_A^{L_2}(N;K=2\rho+2) &amp; = &amp; \sum_{a \in A} \sum_{\ell=0}^{\rho} (-1)^{\ell} F_A^{L_1}(N-(2\ell+1)a; K-(2\ell+1))\nonumber \\
&amp; &amp; +\sum_{a \in A} (-1)^{\rho+1} I(N=(2\rho+2)a)\label{reka1}
\end{eqnarray}
under the convention that $F_A^{L_2}(n;k)=0$ for any $n,k \in {\mathbb Z}$ with $n &lt;k$.
\end{lemma}
\begin{proof}[{\bf Proof.}]
For $a \in A$ and $m \in \{1,\ldots,\rho+1\}$, let ${\cal F}_A^{L_1}(N;K;a;m)$ be the set of all type~II palindromic compositions $(\lambda_1,\ldots,\lambda_K)$ of $N$ with length $K$ and parts in the set $A$ that satisfy
\begin{equation}\label{starr2}
\lambda_1=\cdots=\lambda_m=\lambda_{K-m+2}=\cdots=\lambda_K=a
\end{equation}
and are such that $(\lambda_{m+1},\ldots,\lambda_{K-m+1})$ is a type~I palindromic Carlitz composition of $N-(2m-1)a$ with length $K-(2m-1)=2\rho-2m+3$ and parts in $A$. (If $m=1$, equation~(\ref{starr2}) becomes $\lambda_1=a$.) Let also ${\cal F}_A^{L_2}(N;K;a;m)$ be the set of all compositions $(\lambda_1,\ldots,\lambda_K)$ in ${\cal F}_A^{L_1}(N;K;a;m)$ that satisfy 
$$\lambda_{m+1} = \lambda_{K-m+1} \neq a.$$
Then
\begin{equation}\label{sote3}
{\cal F}_A^{L_2}(N;K;a;m) \bigcup {\cal F}_A^{L_2}(N;K;a;m+1)={\cal F}_A^{L_1}(N;K;a;m)
\end{equation}
and
\begin{equation}\label{sote4}
{\cal F}_A^{L_2}(N;K;a;m) \bigcap {\cal F}_A^{L_2}(N;K;a;m+1)=\emptyset.
\end{equation}
Equations~(\ref{sote3}) and (\ref{sote4}) are true even for $m=\rho+1$ provided we define
$${\cal F}_A^{L_2}(N;K;a;\rho+2)=\begin{cases}
\emptyset, &amp; \mbox{if $N \neq (2\rho+2)a$};\\
\{(a,\ldots,a)\} \in A^{2\rho+2}, &amp; \mbox{if $N=(2\rho+2)a$}.
\end{cases}$$

If $1 \leq m \leq \rho+1$, then we note that $\#{\cal F}_A^{L_1}(N;K;a;m)$ is equal to the number of type~I palindromic Carlitz compositions of $N-(2m-1)a$ with length $K-(2m-1)=2\rho-2m+3$ and parts in $A$,
whereas $\#{\cal F}_A^{L_2}(N;K;a;m)$ is equal to the number of type~II palindromic Carlitz compositions of $N-(2m-2)a$ with length $K-(2m-2)$ and parts in $A$
that start with $a$.

Let $\alpha(m)=\#{\cal F}_A^{L_1}(N;K;a;m)$ and $\beta(m)=\#{\cal F}_A^{L_2}(N;K;a;m)$. Equations~(\ref{sote3}) and (\ref{sote4}) imply
$$\beta(m)+\beta(m+1)=\alpha(m) \quad \mbox{for $m=1,\ldots,\rho+1$}.$$
We can then easily prove that
$$\beta(1)=\sum_{\ell=1}^{\rho+1} (-1)^{\ell+1} \alpha(\ell)+(-1)^{\rho+1}\beta(\rho+2).$$
Then (with $K=2\rho+2$)
$$\#{\cal F}_A^{L_2}(N;K;a;m=1)=\sum_{\ell=1}^{\rho+1} (-1)^{\ell+1} \, \#{\cal F}_A^{L_1}(N;K;a;m=\ell)+(-1)^{\rho+1}I(N=Ka).$$
Summing over $a \in A$, we can easily prove equation~(\ref{reka1}) in the lemma.
\end{proof}

\begin{proof}[{\bf Proof of Theorem~\ref{kentucky}.}]
If $K=1$, then $F_A^{L_2}(N;K=1)=I(N \in A)$, while for $K$ odd integer $\geq 3$, it is impossible to have any type II palindromic Carlitz composition $(\lambda_1,\ldots,\lambda_K)$
of $N$ with length $K$ because, if this were the case, then we would have $\lambda_{(K+1)/2}=\lambda_{(K+3)/2}$.

Let $\rho \in {\mathbb Z}_{\geq 0}$. Then $F_A^{L_2}(N; K=2\rho+2)$ is given by equation~(\ref{reka1}) in Lemma~\ref{reka}. Hence, 
\begin{small}
\begin{eqnarray}
\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\sum_{N,K\geq 1} F_A^{L_2}(N;K)\, x^N\,y^K &amp; = &amp; \sum_{N \geq 1} F_A^{L_2}(N;K=1)\, x^N\, y+
\sum_{N \geq 1} \sum_{\rho=0}^{\infty} F_A^{L_2}(N;K=2\rho+2)\, x^N y^{2\rho+2}\!\!\! \\
&amp; = &amp; \sum_{N = 1}^{\infty}\sum_{\rho=0}^{\infty}\sum_{a \in A} \sum_{\ell=0}^{\rho} (-1)^{\ell} F_A^{L_1}(N-(2\ell+1)a; K-(2\ell+1))\, x^N y^{2\rho+2}\nonumber \\
&amp; &amp; +\sum_{N = 1}^{\infty}\sum_{\rho=0}^{\infty}\sum_{a \in A} (-1)^{\rho+1} I(N=(2\rho+2)a)\, x^N y^{2\rho+2}\nonumber \\ &amp; &amp; +\sum_{N=1}^{\infty} I(N \in A) 
\, x^N y.\label{turk}
\end{eqnarray}
\end{small}

We denote the three terms in the right-hand side of equation~(\ref{turk}) by $D_1, D_2, D_3.$ Clearly, $D_3=\sum_{a \in A} x^a y$, while
$$D_2=\sum_{a \in A} \sum_{\rho=0}^{\infty} (-1)^{\rho+1}x^{(2\rho+2)a}y^{2\rho+2}=-\sum_{a \in A} \frac{x^{2a}y^2}{1+x^{2a}y^2}.$$
Finally, 
$$D_1=\sum_{N=1}^{\infty} \sum_{\ell=0}^{\infty}\sum_{a \in A} (-1)^{\ell} x^{(2\ell+1)a} y^{2\ell+1} \sum_{\rho=\ell}^{\infty}F_A^{L_1}(N-(2\ell+1)a;2(\rho-\ell)+1)\, x^{N-(2\ell+1)a}y^{2(\rho-\ell)+1}.$$
Letting $n=N-(2\ell+1)a$ and $r=\rho-\ell$ and using equation~(\ref{rema1}), we get 
\begin{eqnarray*}
D_1 &amp; = &amp; \sum_{a\in A} \left(\sum_{\ell=0}^{\infty} (-1)^{\ell} x^{(2\ell+1)a}y^{2\ell+1}\right) \left(\sum_{n,r\geq 0} F_A^{L_1}(n;2r+1)\,x^n y^{2r+1}\right)\\
&amp; = &amp; \left(\sum_{a \in A} \frac{x^a y}{1+x^{2a}y^2}\right)\left(\frac{\sum_{a \in A} \frac{x^a y}{1+x^{2a}y^2}}{1-\sum_{a \in A} \frac{x^{2a} y^2}{1+x^{2a}y^2}}\right)
=  \frac{\left(\sum_{a \in A} \frac{x^a y}{1+x^{2a}y^2}\right)^2}{1-\sum_{a \in A} \frac{x^{2a} y^2}{1+x^{2a}y^2}}.
\end{eqnarray*}
This completes the proof of Theorem~\ref{kentucky}.
\end{proof}

If $a \in A$, we let $E_A^{\overline{C}}(N;K;a)$ denote the number of linear Carlitz compositions of $N$ with length $K$ and parts in $A$ that start and end with $a$. We also let $E_A^L(N;K;a)$ denote the number of linear Carlitz compositions of $N$ with length $K$ and parts in $A$ that start with $a$. By symmetry, it is also the number of linear Carlitz compositions of $N$ with length $K$ and parts in $A$ that end with $a$. Note that $E_A^L(N;K=0;a)=0$ for any $N \in {\mathbb Z}_{\geq 0}$. 

For fixed $K \in {\mathbb Z}_{&gt;0}$, let
\begin{equation}\label{SSS111}
E_A^{\overline{C}}(K;a;x)=\sum_{N \geq 1} E_A^{\overline{C}}(N;K;a)\, x^N \quad \mbox{and} \quad
E_A^L(K;a;x)=\sum_{N \geq 0} E_A^{L}(N;K;a)\, x^N.
\end{equation}
Again, note that $E_A^L(K=0;a;x)=0.$ For $K \in {\mathbb Z}_{&gt;0}$, let also 
\begin{equation}\label{TTT111}
E_A^{\overline{C}}(K;x)=\sum_{a \in A} E_A^{\overline{C}}(K;a;x) \quad \mbox{and} \quad
E_A^L(K;x)= \sum_{a \in A} E_A^{L}(K;a;x).
\end{equation}
For $K \in {\mathbb Z}_{&gt;0}$, $E_A^{\overline{C}}(K;x)=\sum_{N\geq 1} E_A^{\overline{C}}(N;K)\, x^N$ and $E_A^L(K;x)=\sum_{N \geq 1} E_A^L(N;K)\, x^N.$ We also have $E_A^L(K=0;x)=E_A^L(N=0,K=0) \, x^0=1.$ The following lemma is needed in the proof of Theorem~\ref{tru1}.

\begin{lemma}\label{above}
Let $K \in {\mathbb Z}_{&gt;0}$, $A \subseteq {\mathbb Z_{&gt;0}}$, and $a \in A$.

1. For $K=2m$ with $m \in {\mathbb Z}_{&gt;0}$, we have
    \begin{equation}\label{lafa1}
    E_A^{\overline{C}}(K=2m;a;x)=\sum_{\ell=1}^{m-1} x^{2\ell a} E_A^L(2m-2\ell; x)-2 \sum_{\ell=1}^{m-1} x^{2\ell a} E_A^L(2m-2\ell; a; x).
    \end{equation}
    
2. For $K=2m+1$ with $m \in {\mathbb Z}_{&gt;0}$, we have
    \begin{equation}\label{lafa2}
    E_A^{\overline{C}}(K=2m+1;a;x)=\sum_{\ell=1}^{m} x^{2\ell a} E_A^L(2m-2\ell+1;x)-2\sum_{\ell=1}^{m} x^{2\ell a} E_A^L(2m-2\ell+1;a;x)+x^{(2m+1)a}.
    \end{equation}
\end{lemma}
\begin{proof}[{\bf Proof.}]
1. We proceed by induction on $m$. For $m=1$, equation~(\ref{lafa1}) is true because $E_A^{\overline{C}}(N;K=2;a)=0$ for any $N \in {\mathbb Z}_{&gt;0}$ and an empty sum is zero.

Assume equation~(\ref{lafa1}) holds for $m=M \in {\mathbb Z}_{&gt;0}$.
Following the methodology of Heubach and Mansour~\cite{heubach}, we create $\overline{C}$-type Carlitz compositions by adding $a \in A$ to the left and to the right of any Carlitz composition of $N-2a$ (provided $N-2a\geq 1$) with length $K=2M$ and parts in $A$, except for those Carlitz compositions of $N-2a$ (with length $K=2M$ and parts in $A$) that
\begin{enumerate}
\item[(i)] start with $a$, but do not end with $a$;
\item[(ii)] end with $a$, but do not start with $a$;
\item[(iii)] start and end with $a$.
\end{enumerate}
The numbers in cases (i) and (ii) are the same, and each equals $$E^L_A(N-2a;K=2M;a)-E_A^{\overline{C}}(N-2a;K=2M;a),$$
while the number in case (iii) is $E_A^{\overline{C}}(N-2a;K=2M;a)$. It follows that
\begin{eqnarray*}
E_A^{\overline{C}}(N;K=2M+2; a) &amp; = &amp; E_A^L(N-2a; K=2M)-2E_A^L(N-2a;K=2M;a)\\
&amp; &amp; +E_A^{\overline{C}}(N-2a;K=2M;a).
\end{eqnarray*}
Multiplying both sides of the above equation by $x^{N}$ and summing over $N$, we get 
$$E_A^{\overline{C}}(K=2M+2;a;x)=x^{2a} E_A^L(2M;x)-2x^{2a}E_A^L(2M;a;x)+x^{2a}E_A^{\overline{C}}(2M;a;x).$$
Using the induction hypothesis for $m=M$, we get
\begin{eqnarray*}
\!\!\!E_A^{\overline{C}}(K=2M+2;a;x) &amp; = &amp; x^{2a} E_A^L(2M;x)-2x^{2a}E_A^L(2M;a;x)\\ &amp; &amp; +
\sum_{\ell=1}^{M-1} x^{2(\ell+1) a} E_A^L(2M-2\ell; x)-2 \sum_{\ell=1}^{M-1} x^{2(\ell+1)a} E_A^L(2M-2\ell; a; x)\\
&amp; = &amp; x^{2a} E_A^L(2M;x)-2x^{2a}E_A^L(2M;a;x)\\ &amp; &amp; +
\sum_{s=2}^{M} x^{2sa} E_A^L(2M+2-2s; x)-2 \sum_{s=2}^{M} x^{2sa} E_A^L(2M+2-2s; a; x).
\end{eqnarray*}
Hence,
$$E_A^{\overline{C}}(K=2M+2;a;x)=\sum_{s=1}^{M} x^{2sa} E_A^L(2M+2-2s; x)-2 \sum_{s=1}^{M} x^{2sa} E_A^L(2M+2-2s; a; x),$$
and the induction step is complete.

2. We again proceed by induction on $m$. For $m=1$, equation~(\ref{lafa2}) is true because, for $N \in {\mathbb Z}_{&gt;0}$,
\begin{eqnarray*}
E_A^{\overline{C}}(N;K=3;a) &amp; = &amp; \sum_{N \geq 1} I(N-2a\in A)\, x^N-x^{3a}\\
&amp; = &amp; x^{2a} \sum_{N \geq 1} I(N-2a\in A)\, x^{N-2a}-x^{3a}\\ 
&amp; = &amp; x^{2a} \left(\sum_{b \in A} x^b\right) -x^{3a}\\
&amp; = &amp; \sum_{\ell=1}^{1} x^{2\ell a} E_A^L(2-2\ell+1;x)-2\sum_{\ell=1}^{1} x^{2\ell a} E_A^L(2-2\ell+1;a;x)+x^{(2+1)a}.
\end{eqnarray*}
The rest of the proof is similar to the proof of Part 1 of the lemma. We assume equation~(\ref{lafa2}) holds for $m=M \in {\mathbb Z}_{&gt;0}$, and following the methodology of Heubach and Mansour~\cite{heubach}, we prove it for $m=M+1$. The details are omitted.
\end{proof}

Before proving Theorem~\ref{tru1}, we need the lemma below. For $a \in A$, let 
\begin{equation}\label{UUU111}
E_A^L(a;x,y)=\sum_{N,K \geq 0} E_A^L(N;K;a)\, x^N\, y^K=\sum_{K \geq 0} E_A^L(K;a;x) \,y^K
\end{equation}
and
\begin{equation}\label{VVV111}
E_A^L(x,y)=\sum_{N,K \geq 0} E_{A}^L(N;K)\, x^N y^K=1+\sum_{a \in A} E_A^L(a;x,y).
\end{equation}

\begin{lemma}\label{limos}
Let $A \subseteq {\mathbb Z}_{&gt;0}$ and $a \in A$. Then
\begin{equation}\label{danei}
E_A^L(a;x,y)=\frac{x^ay}{1+x^ay} E_A^L(x,y).
\end{equation}
\end{lemma}
\begin{proof}[{\bf Proof.}]
Using the methodology and results of Heubach and Mansour~\cite{heubach} (see also the proof of Lemma~\ref{above} above), we have, for each $K \in {\mathbb Z}_{&gt;0}$,
$$E_A^L(K;a;x)=x^a E_A^L(K-1;x)-x^aE_A^L(K-1;a;x),$$
with $E_A^L(K=0;a;x)=0$ and $E_A^L(K=1;a;x)=x^a$. Using the above equality and equations~(\ref{SSS111}) and (\ref{TTT111}), we can then prove by induction on $K$ that 
\begin{equation}\label{thai}
E_A^L(K;a;x)=\sum_{\ell=1}^K (-1)^{\ell-1}x^{\ell a}E_A^L(K-\ell;x).
\end{equation}
Using equations~(\ref{UUU111})--(\ref{thai}) and the fact $E_A^L(K=0;a;x)=0$, we then have
\begin{eqnarray*}
E_A^L(a;x,y) &amp; = &amp; \sum_{K=1}^{\infty} \sum_{\ell=1}^K (-1)^{\ell-1}x^{\ell a}E_A^L(K-\ell;x)\, y^K\\
&amp; = &amp; \sum_{\ell=1}^{\infty}(-1)^{\ell-1}x^{\ell a}y^{\ell} \sum_{K=\ell}^{\infty} E_A^L(K-\ell;x)\, y^{K-\ell}\\
&amp;=&amp;\sum_{\ell=1}^{\infty} (-1)^{\ell-1}x^{\ell a}y^{\ell} \sum_{s=0}^{\infty} E_A^L(s;x)\, y^s=\frac{x^ay}{1+x^ay} E_A^L(x,y).
\end{eqnarray*}
This completes the proof of the lemma.
\end{proof}

\begin{proof}[{\bf Proof of Theorem~\ref{tru1}.}]
 Let $a \in A$ and $$E_A^{\overline{C}}(a;x,y) :=\sum_{K\geq 1} E_A^{\overline{C}}(K;a;x)\, y^K,$$ where $E_A^{\overline{C}}(K;a;x)$ is defined by one of the equations (\ref{SSS111}). Note that $E_A^{\overline{C}}(K=1;a;x)=0$. Then
 \begin{equation}
 E_A^{\overline{C}}(a;x,y) = \sum_{m=1}^{\infty} E_A^{\overline{C}}(K=2m;a;x)\, y^{2m}+\sum_{m=1}^{\infty} E_A^{\overline{C}}(K=2m+1;a;x)\, y^{2m+1}.\label{salio1}
 \end{equation}
 Substituting equations~(\ref{lafa1}) and (\ref{lafa2}) (from Lemma~\ref{above}) in equation~(\ref{salio1}) and changing the order of summation in the four double sums we get, we obtain
 \begin{eqnarray*}
 E_A^{\overline{C}}(a;x,y) &amp; = &amp; \sum_{\ell=1}^{\infty} x^{2\ell a}\sum_{m=\ell+1}^{\infty} E_A^L(2m-2\ell;x)\, y^{2m}+\sum_{\ell=1}^{\infty} x^{2\ell a}\sum_{m=\ell}^{\infty} E_A^L(2m-2\ell+1;x)\, y^{2m+1}\\
 &amp;  &amp; -2\sum_{\ell=1}^{\infty} x^{2\ell a}\sum_{m=\ell+1}^{\infty} E_A^L(2m-2\ell;a;x)\, y^{2m}\\
 &amp; &amp; -2\sum_{\ell=1}^{\infty} x^{2\ell a}\sum_{m=\ell}^{\infty} E_A^L(2m-2\ell+1;a;x)\, y^{2m+1}+\frac{x^{3a}y^3}{1-x^{2a}y^2}.
 \end{eqnarray*}
 Combining the first two double sums and doing the same for the next two double sums on the right-hand side of the above equation, we get
 \begin{eqnarray*}
 E_A^{\overline{C}}(a;x,y) &amp; = &amp; \sum_{\ell=1}^{\infty} x^{2\ell a} y^{2\ell}\sum_{M=2\ell+1}^{\infty} E_A^L(M-2\ell; x)\, y^{M-2\ell}\\
 &amp; &amp; -2\sum_{\ell=1}^{\infty} x^{2\ell a}y^{2\ell} \sum_{M=2\ell+1}^{\infty} E_A^L(M-2\ell;a; x)\, y^{M-2\ell}+\frac{x^{3a} y^3}{1-x^{2a}y^2}.
\end{eqnarray*}
After some algebraic manipulations, we get
$$E_A^{\overline{C}}(a;x,y)=\frac{x^{2a}y^2}{1-x^{2a}y^2}\left(E_A^L(x,y)-1-2E_A^L(a;x,y)\right)
+\frac{x^{3a} y^3}{1-x^{2a}y^2}.$$
Using equation~(\ref{danei}) from Lemma~\ref{limos}, we get
$$E_A^{\overline{C}}(a;x,y)=\frac{x^{2a}y^2}{(1+x^{a}y)^2}E_A^L(x,y)-\frac{x^{2a} y^2}{1+x^{a}y}.$$
Summing over $a \in A$ and using equation~(\ref{starA}), we get
$$E_A^{\overline{C}}(x,y)=\frac{\sum_{a \in A} \frac{x^{2a}y^2}{(1+x^{a}y)^2}}{1-\sum_{a \in A} \frac{x^ay}{1+x^ay}}-\sum_{a \in A} \frac{x^{2a} y^2}{1+x^{a}y}.$$
The bivariate generating function of the number of C-type cyclic Carlitz compositions of $N$ with length $K$ and parts in $A$ satisfies
$$E_A^C(x,y)=E_A^L(x,y)-1-E_A^{\overline{C}}(x,y),$$
Therefore, after some algebra, we can easily prove equation~(\ref{Alala}).
\end{proof}

\begin{proof}[{\bf Proof of Corollary~\ref{tru2}.}] 
It follows from Theorem~\ref{tru1} by letting $y=1$ in equation~(\ref{Alala}).
\end{proof}

\begin{proof}[{\bf Proof of Theorem~\ref{shelfA1}.}]
The proof of this theorem is similar to the proofs of the main results in Hadjicostas~\cite{hadji123}, and hence we give only a sketch of the proof and emphasize the important steps.

Consider an arbitrary (modified) CR-type Carlitz composition $[(\lambda_1,\ldots,\lambda_K)]_{CR}$
of $N$ with length $K$ and parts in $A$. We place the $\lambda_i$'s on a circle (i.e., $\lambda_1$ follows $\lambda_N$), and we define the period $h$ of this circular composition to be the length of the shortest subsequence of $\lambda_i$'s with consecutive indices that is able to reproduce $[(\lambda_1,\ldots,\lambda_K)]_{CR}$ by repeating itself $K/h$ times. It follows that  $K/h$ divides $N$.

Denote by $\tilde{E}^{CR}_A(N;K;h)$ the number of all (modified) CR-type cyclic Carlitz compositions of $N$ with length $K$, period $h$, and parts in $A$. For $1 \leq K \leq N$,
\begin{equation} \label{nokA}
\tilde{E}_A^{CR}\left(N;K;\frac{K}{d}\right)=\tilde{E}_A^{CR}\left(\frac{N}{d};\frac{K}{d};\frac{K}{d}\right) \quad \mbox{for all positive divisors $d$ of $\gcd(N,K)$}
\end{equation}
and 
\begin{equation}\label{sond22}
\tilde{E}_A^C(N;K)=\sum_{h|K\,\, \&amp; \,\, \frac{K}{h}|N} h \, \tilde{E}_A^{CR}(N;K;h).
\end{equation}
Letting $s=\frac{K}{h},$ it follows from equations~(\ref{nokA}) and (\ref{sond22}) that
\begin{equation}\label{studentA}
\tilde{E}_A^C(N;K)=\sum_{s|\gcd(N,K)} \frac{K}{s} \, \tilde{E}_A^{CR}\left(N; K;\frac{K}{s}\right)=\sum_{s|\gcd(N,K)} \frac{K}{s} \, \tilde{E}_A^{CR}\left(\frac{N}{s}; \frac{K}{s}; \frac{K}{s}\right).
\end{equation}
Similarly,
\begin{eqnarray}
\tilde{E}_A^{CR}(N;K) &amp; = &amp; \sum_{h|K \,\, \&amp; \,\, \frac{K}{h} | N} \tilde{E}_A^{CR}(N;K;h)\nonumber \\
&amp; = &amp; \sum_{s|\gcd(N,K)} \tilde{E}_A^{CR}\left(N; K; \frac{K}{s}\right)=\sum_{s|\gcd(N,K)}
\tilde{E}_A^{CR}\left(\frac{N}{s}; \frac{K}{s}; \frac{K}{s}\right).\label{TROY}
\end{eqnarray}

Using equations~(\ref{studentA}) and~(\ref{TROY}), the associativity of Dirichlet convolutions,
and M\"obius's inversion principle, we can derive equation~(\ref{A123456}) using similar techniques as in the proof of Theorem~1 in Hadjicostas~\cite{hadji123}.

To prove equation~(\ref{Asanta1}), we sum both sides of (\ref{A123456}) from $K=1$ to $K=N$:
$$\tilde{E}_A^{CR}(N)=\sum_{K=1}^N \tilde{E}_A^{CR}(N;K)=\sum_{K=1}^N \sum_{d|\gcd(N,K)} \frac{1}{K} \phi(d) \, \tilde{E}_A^C\left(\frac{N}{d}; \frac{K}{d}\right).$$
Letting $s=N/d$ and $\ell=K/d$, and switching the order of summation in the last double sum above, we get
\begin{equation}\label{Kelle}
\tilde{E}_A^{CR}(N)=\sum_{s|N} \sum_{\ell=1}^s \frac{\phi(N/s)}{\ell N/s} \, \tilde{E}_A^C(s; \ell)=\frac{1}{N} \sum_{s|N} \phi\left(\frac{N}{s}\right) \, s \sum_{\ell=1}^s \frac{\tilde{E}_A^C(s; \ell)}{\ell}.
\end{equation}
Using equations (\ref{nanaLL}) and (\ref{Kelle}), we can easily prove equation~(\ref{Asanta1}).

To derive the generating function for $\tilde{E}_A^{CR}(N;K)$, note that equation~(\ref{Alala}) implies
\begin{eqnarray*}
\sum_{N,K \geq 1}\tilde{E}_A^{C}(N;K)\, x^Ny^K &amp; = &amp; \sum_{N,K \geq 1} E_A^C(N;K)\, x^N y^K-\sum_{N \geq 1} I(N \in A)\, x^N y\\
&amp; = &amp; \frac{\sum_{a \in A} \frac{x^ay}{(1+x^ay)^2}}{1-\sum_{a \in A} \frac{x^ay}{1+x^ay}}-\sum_{a \in A} \frac{x^ay}{1+x^ay}.
\end{eqnarray*}
It follows that
\begin{eqnarray*}
\sum_{N,K \geq 1} \frac{\tilde{E}_A^C(N;K)\, x^Ny^K}{K} &amp; = &amp; \int_0^y \sum_{N,K \geq 1}\tilde{E}_A^C(N;K)\, x^Nw^{K-1}\,dw \\
&amp; = &amp; \int_0^y \left(\frac{\sum_{a \in A} \frac{x^a}{(1+x^aw)^2}}{1-\sum_{a \in A} \frac{x^aw}{1+x^aw}}-\sum_{a \in A} \frac{x^a}{1+x^aw}\right)dw.
\end{eqnarray*}
Therefore,
\begin{equation}
\sum_{N,K \geq 1} \frac{\tilde{E}_A^C(N;K)\, x^Ny^K}{K}=G_A(x,y),
\end{equation}
where $G_A(x,y)$ is given by equation~(\ref{sedraxP}). Equation~(\ref{A123456}) then implies
$${\rm G.F.}=\sum_{N=1}^{\infty} \sum_{K=1}^{\infty} \tilde{E}_A^{CR}(N;K)\, x^Ny^K=\sum_{N=1}^{\infty} \sum_{K=1}^{\infty} \frac{1}{K} \sum_{s|\gcd(N,K)} \phi(s) \, \tilde{E}_A^{C}\left(\frac{N}{s}; \frac{K}{s}\right)x^Ny^K.$$
Letting $n=N/s$ and $k=K/s$ and changing the order of the triple summation, we get
\begin{eqnarray*}
{\rm G.F.} &amp; = &amp; \sum_{s=1}^{\infty} \sum_{n=1}^{\infty} \sum_{k=1}^{\infty} \frac{\phi(s)}{ks}\tilde{E}_A^C(n;k)\, x^{ns}y^{ks}\\
&amp; = &amp; \sum_{s=1}^{\infty} \frac{\phi(s)}{s} \sum_{n,k\geq 1} \frac{\tilde{E}_A^C(n;k)}{k}(x^s)^n (y^s)^k 
 =  \sum_{s=1}^{\infty} \frac{\phi(s)}{s}G_A(x^s,y^s).
\end{eqnarray*}
This completes the proof of the theorem.
\end{proof}

\begin{proof}[{\bf Proof of Theorem~\ref{shelfA2}.}]
If $K=1$, we clearly have $F_A^{CR}(N;K=1)=I(N \in A)$. Assume $2 \leq K \leq N$. Then every symmetrical CR-type cyclic Carlitz composition of $N$ with length $K$ and parts in $A$ has at least two distinct parts and its equivalence class contains exactly two linear palindromic (Carlitz) compositions of either type. (The latter fact follows from Theorem~1.1 in Hadjicostas and Zhang~\cite{123AAL}.) But every type I linear palindromic composition $(\lambda_1,\ldots,\lambda_K)$ with
$K \geq 2$ satisfies $\lambda_1=\lambda_K,$ so it cannot be Carlitz. This immediately implies that
$F_A^{CR}(N;K)=F_A^{L_2}(N;K)/2.$ Equation~(\ref{laos2}) follows immediately from Theorem~\ref{kentucky}.
\end{proof}

\begin{proof}[{\bf Proof of Corollary~\ref{Mppp}.}]
We have
\begin{eqnarray*}
F_A^{CR}(N) &amp; = &amp; F_A^{CR}(N;K=1)+\sum_{K=2}^{\infty} F_A^{CR}(N;K)\\
&amp; = &amp; I(N \in A)+\frac{1}{2}\sum_{K=2}^{\infty}F_A^{L_2}(N;K)\\
&amp; = &amp; I(N\in A)+\frac{1}{2}\left(F_A^{L_2}(N)-F_A^{L_2}(N;K=1)\right) =  \frac{F_A^{L_2}(N)
+I(N \in A)}{2}.
\end{eqnarray*}
The G.F. for $F_A^{CR}(N)$ follows by setting $y=1$ in equation~(\ref{laos2}).
\end{proof}

\begin{proof}[{\bf Proof of Theorem~\ref{shelfA3}.}]
Similar to an argument in Hadjicostas and Zhang~\cite{123AAL} (see equation~(\ref{notalk}) in this paper), we have
$$E_A^D(N;K) =\frac{E_A^{CR}(N;K)-F_A^{CR}(N;K)}{2}+F_A^{CR}(N;K)=\frac{E_A^{CR}(N;K)+F_A^{CR}(N;K)}{2}.$$
The proof of the rest of theorem follows easily from Theorem~\ref{shelfA2}.
\end{proof}

\begin{proof}[{\bf Proof of Corollary~\ref{shelfA5}.}]
It follows from Corollary~\ref{Mppp} and Theorem~\ref{shelfA3}.
\end{proof}

\section{Future research}\label{final2}

In a series of four papers, Bender and Canfield~\cite{bender1, bender2, bender3} and Bender, Canfield, and Gao~\cite{bender4} discuss ``locally restricted compositions," which generalize the idea of Carlitz composition. In these four papers, the authors discuss at least two different definitions of ``locally restricted compositions." They also prove asymptotic probabilistic results about random locally restricted compositions.

Cyclic and dihedral compositions do {\it not} form part of these ``locally restrictive compositions," and hence further research is needed to create a general theory of  {\it locally restricted cyclic and dihedral compositions}. The techniques in this paper and in Taylor~\cite{taylor1}, along with the techniques in the four aforementioned papers, may serve as starting points for creating such a general theory.

\section{Acknowledgments}
The author wishes to thank statistician Lingyun Zhang for some help in writing this paper. In addition, the author wishes to thank the referee for useful comments that improved the presentation of the paper. In particular, the material in Section~\ref{final2} is based on his or her suggestions.

\begin{thebibliography}{99}

\bibitem{beck2015} M.~Beck and N.~Robbins, Variations on a generating-function theme: enumerating compositions with parts avoiding an arithmetic sequence, {\it Amer.~Math.~Monthly} \textbf{122} (2015), 256--263.

\bibitem{bender1} E.~A.~Bender and E.~R.~Canfield, Locally restricted compositions I.\ Restricted adjacent differences, {\it Electron.~J.~Combin.}\ {\bf 12} (2005), \href{http://www.combinatorics.org/ojs/index.php/eljc/article/view/v12i1r57}{Article \#R57}.

\bibitem{bender2} E.~A.~Bender and E.~R.~Canfield, Locally restricted compositions II.\ General restrictions and infinite matrices, {\it Electron.~J.~Combin.}\ {\bf 16} (2009), \href{http://www.combinatorics.org/ojs/index.php/eljc/article/view/v16i1r108}{Article \#R108}.

\bibitem{bender3} E.~A.~Bender and E.~R.~Canfield, Locally restricted compositions III.\ Adjacent-part periodic inequalities, {\it Electron.~J.~Combin.}\ {\bf 17} (2010), \href{http://www.combinatorics.org/ojs/index.php/eljc/article/view/v17i1r145}{Article \#R145}.

\bibitem{bender4} E.~A.~Bender, E.~R.~Canfield, and Z.~Gao, Locally
restricted compositions IV.\ Nearly free large parts and gap-freeness,
{\it Electron.~J.~Combin.}\ {\bf 19} (4) (2012),
\href{http://www.combinatorics.org/ojs/index.php/eljc/article/view/v19i4p14}{Article \#P14}.

\bibitem{carliz} L.~Carlitz, Restricted compositions, {\it Fibonacci Quart.}\ {\bf 14} (1976), 254--264.

\bibitem{coret} S.~Corteel and P.~Hitczenko, Generalizations of Carlitz compositions,  {\it J.~Integer Sequences} {\bf 10} (2007), \href{https://cs.uwaterloo.ca/journals/JIS/VOL10/Hitczenko/hitczenko4.pdf}{Article 07.8.8}.

\bibitem{fla} P.~Flajolet and R.~Sedgewick, \textit{Analytic Combinatorics}, Cambridge University Press, 2009.

\bibitem{fla2} P.~Flajolet and M.~Soria, The cycle construction, {\it SIAM J.~Discrete Math.}\ {\bf 4}  (1991), 58--60.

\bibitem{hadji123} P.~Hadjicostas, Cyclic compositions of a positive integer with parts avoiding an arithmetic sequence, {\it J.~Integer Sequences} {\bf 19} (2016), \href{https://cs.uwaterloo.ca/journals/JIS/VOL19/Hadjicostas/hadji2.html}{Article 16.8.2}.

\bibitem{123AAL} P.~Hadjicostas and L.~Zhang, Sommerville's symmetrical cyclic compositions of a positive integer with parts avoiding multiples of an integer, {\it Fibonacci Quart.}\ \textbf{55} (2017), 54--73.

\bibitem{heubach} S.~Heubach and T.~Mansour, Compositions of $n$ with parts in a set,  {\it Congr.~Numer.}\ {\bf 168} (2004), 127--143.

\bibitem{heubach1} S.~Heubach and T.~Mansour, {\it Combinatorics of
Compositions and Words,} CRC Press, 2010.

\bibitem{hoggart} V.~E.~Hoggatt, Jr., and D.~A.~Lind, Fibonacci and
binomial properties of weighted compositions, {\it J.~Combin.~Theory} {\bf 4} (1968), 121--124.

\bibitem{macher} A.~Knopfmacher and H.~Prodinger, On Carlitz compositions, {\it European J.~Combin.}\ {\bf 19} (1998), 579--589.

\bibitem{knob33} A.~Knopfmacher and N.~Robbins, Some properties of cyclic compositions, {\it Fibonacci Quart.}\ \textbf{48} (2010), 249--255.

\bibitem{knob} A.~Knopfmacher and N.~Robbins, Some properties of dihedral compositions, {\it Util.~Math.}\ \textbf{92} (2013), 207--220.

\bibitem{fujit1} P.~A.~MacMahon, Memoir on the theory of the compositions of numbers, {\it Philos.~Trans.~Roy.~Soc.~London~A} {\bf 184} (1893), 835--901.

\bibitem{fat1} P.~A.~MacMahon, Second memoir on the compositions of numbers, {\it Philos. Trans. Roy. Soc. London~A} {\bf 207} (1908), 65--134.

\bibitem{moser} L.~Moser and E.~L.~Whitney, Weighted compositions, {\it Canad.~Math.~Bull.}\ {\bf 4} (1961), 39--43.

\bibitem{razen} R.~Razen, J.~Seberry, and K.~Wehrhahn, Ordered partitions and codes generated by circulant matrices, {\it J.~Combin.~Theory Ser.~A} {\bf 27} (1979), 333--341.

\bibitem{Sommer} D.~M.~Y.~Sommerville, On certain periodic properties of cyclic compositions of numbers, {\it Proc.~London Math.~Soc.}\ \textbf{S2-7(1)} (1909), 263--313.

\bibitem{taylor1} J.~Taylor, Counting words with Laguerre series, {\it
Electron.~J.~Combin.}\ {\bf 21} (2) (2014), \#P2.1.

\bibitem{salvi1} N.~Zagaglia Salvi, Ordered partitions and colourings of cycles and necklaces, {\it Bull.~Inst.~Combin.~Appl.}\ {\bf 27} (1999), 37--40.

\bibitem{zhang2} L.~Zhang and P.~Hadjicostas, On sequences of
independent Bernoulli trials avoiding the pattern~``11...1", {\it
Math.~Scientist} {\bf 40} (2015), 89--96.

\end{thebibliography}


\bigskip
\hrule
\bigskip

\noindent 2010 {\it Mathematics Subject Classification}: Primary 05A15; Secondary 05A10.

\noindent \emph{Keywords: } Carlitz composition, cyclic composition, dihedral composition, Euler's totient function, palindromic composition, symmetrical cyclic composition.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A000070},
\seqnum{A106369},
\seqnum{A212322}, and
\seqnum{A239327}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received February 1 2017; revised versions received February 12 2017; July 12 2017; August 24 2017.
Published in {\it Journal of Integer Sequences}, September 2 2017.

\bigskip
\hrule
\bigskip

\noindent
Return to
\htmladdnormallink{Journal of Integer Sequences home page}{http://www.cs.uwaterloo.ca/journals/JIS/}.
\vskip .1in

\end{document}

                                                                                

</pre></body></html>