%% if you are submitting an initial manuscript then you should have submission as an option here
%% if you are submitting a revised manuscript then you should have revision as an option here
%% otherwise options taken by the article class will be accepted
\documentclass[finalversion]{FPSAC2020}
\articlenumber{35}
%% but DO NOT pass any options (or change anything else anywhere) which alters page size / layout / font size etc

%% note that the class file already loads {amsmath, amsthm, amssymb}
\usepackage{amscd,amsfonts,epic,eepic,bbm,graphicx,ytableau}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usepackage{rotating}
\usetikzlibrary{angles,quotes}

\theoremstyle{plain}
\newtheorem{thm}{Theorem}[section]
\newtheorem{cor}[thm]{Corollary}
\newtheorem{conj}[thm]{Conjecture}
\newtheorem{lem}[thm]{Lemma}
\newtheorem{prop}[thm]{Proposition}

\theoremstyle{definition}
\newtheorem{defn}[thm]{Definition}
\newtheorem{assumption}[thm]{Assumption}
\newtheorem{quest}[thm]{Question}
\newtheorem{rem}[thm]{Remark}
\newtheorem{example}[thm]{Example}
\newcommand{\la}{\lambda}

%% define your title in the usual way
\title[The $(s,s+d,\dots,s+pd)$-core partitions and rational Motzkin paths]{The $(s,s+d,\dots,s+pd)$-core partitions \\ ~and rational Motzkin paths}

%% define your authors in the usual way
%% use \addressmark{1}, \addressmark{2} etc for the institutions, and use \thanks{} for contact details
\author[Hyunsoo Cho, Jisun Huh, and Jaebum Sohn]{
Hyunsoo Cho%\thanks{\href{mailto:blah}{blah}.}
\addressmark{1}, 
JiSun Huh\thanks{\href{mailto:hyunyjia@ajou.ac.kr}{hyunyjia@ajou.ac.kr}.}\addressmark{2},
\and Jaebum Sohn%\thanks{\href{mailto:blah}{blah}.}
\addressmark{3}
}


%% then use \addressmark to match authors to institutions here
\address{
\addressmark{1} Institute of Mathematical Sciences, Ewha Womans University, Seoul, Republic of Korea\\
\addressmark{2} Department of Mathematics, Ajou University, Suwon, Republic of Korea\\
\addressmark{3} Department of Mathematics, Yonsei University, Seoul, Republic of Korea
}



%% put the date of submission here
\received{\today}

%% leave this blank until submitting a revised version
%\revised{}

%% put your English abstract here, or comment this out if you don't have one yet
%% please don't use custom commands in your abstract / resume, as these will be displayed online
%% likewise for citations -- please don't use \cite, and instead write out your citation as something like (author year)
\abstract{
In this article, we propose an $(s+d,d)$-abacus for $(s,s+d,\dots,s+pd)$-core partitions and establish a bijection between $(s,s+d,\dots,s+pd)$-core partitions and rational Motzkin paths of type $(s+d,-d)$. This result not only gives a lattice path interpretation of the $(s,s+d,\dots,s+pd)$-core partitions but also counts them with a closed formula. Also we enumerate $(s,s+1,\dots,s+p)$-core partitions with $k$ corners and self-conjugate $(s,s+1,\dots,s+p)$-core partitions.   
}

%% put your French abstract here, or comment this out if you don't have one
%\resume{\lipsum[2]}

%% put your keywords here, or comment this out if you don't have them yet
\keywords{simultaneous core partitions, self-conjugate, corners, rational Motzkin paths, generalized Dyck paths
}

%% you can include your bibliography however you want, but using an external .bib file is STRONGLY RECOMMENDED and will make the editor's life much easier
%% regardless of how you do it, please use numerical citations, ie. [xx, yy] in the text

%% this sample uses biblatex, which (among other things) takes care of URLs in a more flexible way than bibtex
%% but you can use bibtex if you want
\addbibresource{mybib.bib}


%% note the \printbibliography command at the end of the file which goes with these biblatex commands

\begin{document}

\maketitle
%% note that you DO NOT have to put your abstract here -- it is generated by \maketitle and the \abstract and \resume commands above

%========================================================================

\section{Introduction}

A partition $\la=(\la_1,\la_2,\dots,\la_\ell)$ of a positive integer $n$ is a finite non-increasing sequence of positive integer parts $\la_i$ such that $\la_1+\la_2+\cdots+\la_\ell=n$. The Young diagram of $\la$ is a finite collection of $n$ boxes arranged in left-justified rows, with the $i$th row having $\la_i$ boxes.
For the Young diagram of $\la$, the partition $\la'=(\la'_1,\la'_2,\dots)$ is called the conjugate of $\la$, where $\la'_j$ denotes the number of boxes in the $j$th column.
For each box of the Young diagram in coordinates $(i,j)$, the hook length $h(i,j)$ is the number of boxes weakly below and strictly to the right of the box. For a partition $\la$, the {\it beta-set} of $\la$, denoted $\beta(\la)$, is defined to be the set of first column hook lengths of $\la$. For example, the conjugate of $\la=(5,4,2,1)$ is $\la'=(4,3,2,2,1)$ and the {\it beta-set} of $\la$ is $\beta(\la)=\{8,6,3,1\}$. 

For a positive integer $t$, a partition $\la$ is a $t$-core (partition) if it has no box of hook length $t$. In the previous example, $\la$ is a $t$-core for $t=5,7,$ or $t\geq 9$. For distinct positive integers $t_1,t_2,\dots,t_p$, we say that a partition $\la$ is a $(t_1,t_2,\dots,t_p)$-core if it is simultaneously a $t_1$-core, a $t_2$-core, \dots, and a $t_p$-core. The study of core partitions arose from the representation theory of the symmetric group $S_n$ (see \cite{JK} for details). Researches on simultaneous core partitions are motivated by the following result of Anderson \cite{Anderson}.

\begin{thm}[\cite{Anderson}, Theorem 1]
For relatively prime positive integers $s$ and $t$, the number of $(s,t)$-core partitions is 
\[
\frac{1}{s+t}\binom{s+t}{s}\,.
\]
In particular, the number of $(s,s+1)$-core partitions is the $s$th Catalan number $C_s=\frac{1}{s+1}\binom{2s}{s}$.
\end{thm}

Since the work of Anderson, results on $(s,t)$-cores were published by many researchers (see \cite{AHJ,CHW,Fayers,FV,FMS,Straub,ZY}). Also, some researchers concerned with simultaneous core partitions whose cores line up in arithmetic progression (see \cite{AL,BNY,CHS,Wang,YYZ,YZZ}).
Yang-Zhong-Zhou \cite{YZZ} showed that the number of $(s,s+1,s+2)$-core partitions is equal to the $s$th Motzkin number $M_s=\sum_{k=0}^{\lfloor s/2 \rfloor} \binom{s}{2k}C_k$, where $C_k$ is the $k$th Catalan number. Amdeberhan-Leven \cite{AL} and Wang \cite{Wang} extended this result as follows.

Let an \emph{$(s,p)$-generalized Dyck path} be a lattice path from $(0,0)$ to $(s,s)$ which stays weakly above the line $y=x$ and consists of vertical steps $(0,p)$, horizontal steps $(p,0)$, and diagonal steps $(i,i)$ for $i=1,2,\dots,p-1$.

\begin{thm}[\cite{AL}, Theorem 4.2]\label{thm:gendyck}
For  positive integers $s$ and $p$, the number of $(s,s+1,\dots,s+p)$-core partitions is equal to the number  $C_s^{(p)}$ of $(s,p)$-generalized Dyck paths, which satisfies the following recurrence relation:
\[
C_s^{(p)}=\sum_{k=1}^{s}C_{k-p}^{(p)}C_{s-k}^{(p)}\,,
\]
where $C_s^{(p)}=1$ for $s<0$.
\end{thm}

\begin{thm}[\cite{Wang}, Theorem 1.6]]\label{thm:Wang}
For relatively prime positive integers $s$ and $d$, the number of $(s,s+d,s+2d)$-core partitions is 
\[
\frac{1}{s+d}\sum_{k=0}^{\lfloor s/2 \rfloor}\binom{s+d}{k,k+d,s-2k}\,.
\]
\end{thm}

Recently, Baek-Nam-Yu \cite{BNY} obtained an alternative proof for \cref{thm:Wang} and found a formula for the number of $(s,s+d,s+2d,s+3d)$-core partitions.

\begin{thm}[\cite{BNY}, Theorem 5.7]\label{thm:BNY}
For relatively prime positive integers $s$ and $d$, the number of $(s,s+d,s+2d,s+3d)$-core partitions is 
\[
\frac{1}{s+d}\sum_{k=0}^{\lfloor s/2 \rfloor}\left\{\binom{s+d-k}{k}+\binom{s+d-k-1}{k-1}\right\}\binom{s+d-k}{s-2k}\,.
\]
\end{thm}

An idea of counting paths was used in  \cite{AL,Anderson,AHJ,CHW,FMS,HW} and counting the lattice points method was used in \cite{BNY,Fayers,FV,Johnson,Wang}. A poset structure is the main tool to get the formulae for counting simultaneous core partitions in \cite{Straub,YZZ,ZY}.

In this article, we define the ``rational Motzkin path", which generalizes the idea of the Motzkin path, and give a generalization of \cref{thm:gendyck,thm:Wang,thm:BNY} by using rational Motzkin paths of type $(s+d,-d)$ with a specific restriction (see \cref{def:rational}). The following is the main result of this article.    
 
\begin{thm}\label{thm:main}
Let $s$ and $d$ be relatively prime positive integers. For a given integer $p\geq2$, the number of $(s,s+d,\dots,s+pd)$-core partitions is equal to the number of rational Motzkin paths of type $(s+d,-d)$ 
without $UF^iU$ steps for $i=0,1,\dots,p-3$ if $p\geq 3$, that is 
\[
\frac{1}{s+d}\binom{s+d}{d}+\sum_{k=1}^{\lfloor s/2 \rfloor}\sum_{\ell=0}^{r}\frac{1}{k+d}\binom{k+d}{k-\ell}\binom{k-1}{\ell}\binom{s+d-\ell(p-2)-1}{2k+d-1}\,,
\]
where $r=\min(k-1,\,\lfloor (s-2k)/(p-2) \rfloor)$.
\end{thm}

As a corollary, by setting $d=1$, we obtain a closed formula for the number of $(s,s+1,\dots,s+p)$-core partitions. Also, we give a bijection between the set of $(s,p)$-generalized Dyck paths and that of Motzkin paths of length $s$ with a restriction. Furthermore, we count the number of $(s,s+1,\dots,s+p)$-core partitions with $k$ corners. At the end of this article, we enumerate self-conjugate $(s,s+1,\dots,s+p)$-core partitions.


 
%==============================================================================

\section{Counting $(s,s+d,\dots,s+pd)$-core partitions}\label{sec:2}

%------------------------------------------------------------------------------

\subsection{The $(s+d,d)$-abacus diagram}  

James-Kerber \cite{JK} introduced the abacus diagram which has played important roles in the theory of core partitions (see \cite{AHJ,Fayers,Johnson2,NS,Olsson}).
The \emph{$s$-abacus diagram} is a diagram with infinitely many rows labeled by nonnegative integers such that the smallest index is at the bottom, and $s$ columns labeled by $0,1,\dots,s-1$, whose position in $(i,j)$ is labeled by $si+j$, where $i\geq 0$ and $j=0,1,\dots,s-1$. The \emph{$s$-abacus} of a partition $\la$ is obtained from the $s$-abacus diagram by placing a bead on each position which the number at this position belongs to $\beta(\la)$. Positions without beads are called spacers. It is well-known that $\la$ is an $s$-core if and only if the $s$-abacus of $\la$ has no spacer below a bead in any column. Equivalently, one can have the following.

\begin{lem}[\cite{JK}, Lemma 2.7.13]\label{lem:core} For a partition $\la$, $\la$ is an $s$-core if and only if $x\in\beta(\la)$ implies $x-s\in\beta(\la)$ whenever $x-s>0$.
\end{lem}


We now introduce the $(s+d,d)$-abacus diagram, which generalizes the definition of the $s$-abacus diagram and the two-way abacus diagram suggested by Anderson \cite{Anderson}.

\begin{defn} 
Let $s$ and $d$ be relatively prime positive integers. The \emph{$(s+d,d)$-abacus diagram} is a diagram with infinitely many rows labeled by integers and $s+d+1$ columns labeled by $0,1,\dots,s+d$, whose position in $(i,j)$ is labeled by $(s+d)i+dj$, where $i\in\mathbb{Z}$ and $j=0,1,\dots,s+d$. For a partition $\la$, the \emph{$(s+d,d)$-abacus} of $\la$ is obtained from the $(s+d,d)$-abacus diagram by placing a \emph{bead} on each position which the number at this position  belongs to $\beta(\la)$. Again, a position without a bead is called a \emph{spacer}.
\end{defn}

\begin{example}\label{ex:abacus} If $\la=(6,4,3,1,1,1,1)$, then $\la$ is a $(5,8,11,\dots)$-core partition and its beta-set is $\beta(\la)=\{12,9,7,4,3,2,1\}$. \cref{fig:abacus2} shows the Young diagram with the hook lengths and the $(8,3)$-abacus of $\la$.

\begin{figure}[ht!]
\centering
\begin{tikzpicture}[scale=.44]
\node at (-8,0) {
\begin{ytableau}
12&7&6&4&2&1 \\
9&4&3&1 \\
7&2&1 \\
4\\
3\\
2\\
1
\end{ytableau}};
\node at (20,3) {$i=3$};
\node at (20,2) {$i=2$};
\node at (20,1) {$i=1$};
\node at (20,0) {$i=0$};
\node at (20,-1) {$i=-1$};
\node at (20,-2) {$i=-2$};
\node at (20,-3) {$i=-3$};

\foreach \i in {0,3,6,9,12,15,18,21,24}
\node at (\i/1.5,0) {$\i$};
\foreach \i in {8,11,14,17,20,23,26,29,32}
\node at (\i/1.5-8/1.5,1) {$\i$};
\foreach \i in {16,19,22,25,28,31,34,37,40}
\node at (\i/1.5-16/1.5,2) {$\i$};
\foreach \i in {24,27,30,33,36,39,42,45,48}
\node at (\i/1.5-24/1.5,3) {$\i$};
\foreach \i in {-8,-5,-2,1,4,7,10,13,16}
\node at (\i/1.5+8/1.5,-1) {$\i$};
\foreach \i in {-16,-13,-10,-7,-4,-1,2,5,8}
\node at (\i/1.5+16/1.5,-2) {$\i$};
\foreach \i in {-24,-21,-18,-15,-12,-9,-6,-3,0}
\node at (\i/1.5+24/1.5,-3) {$\i$};
\node at (8,4.2) {\vdots};
\node at (8,-3.9) {\vdots};
\draw (8,0) circle (13pt);
\draw (6,0) circle (13pt);
\draw (10,-1) circle (13pt);
\draw (8,-1) circle (13pt);
\draw (6,-1) circle (13pt);
\draw (2,0) circle (13pt);
\draw (12,-2) circle (13pt);
\end{tikzpicture}
\caption{The Young diagram of the partition $(6,4,3,1,1,1,1)$ with the hook lengths and its $(8,3)$-abacus}\label{fig:abacus2}
\end{figure}
\end{example}

This modified abacus diagram is useful when we consider $(s,s+d,\dots,s+pd)$-core partitions with $p\geq 2$. For a given $(s,s+d,\dots,s+pd)$-core partition $\la$, if we consider the $(s+d,d)$-abacus of $\la$, then a bead on the position in $(i,j)$ implies that positions in $(i-1,j-p+1),(i-1,j-p+2),\dots,(i-1,j+1)$ are also beads whenever these positions are labeled by positive integers as in \cref{fig:abacus2}. We now have the following lemma.

\begin{lem}\label{lem:af}
For a given $p\geq2$ and the $(s+d,d)$-abacus of an $(s,s+d,\dots,s+pd)$-core $\la$, we define a function $f:\{0,1,\dots,s+d\}\rightarrow \mathbb{Z}$
as follows:
For a column number $j$, $f(j)$ is defined to be the smallest row number $i$ satisfying that the position in $(i,j)$ is a spacer being labeled by a nonnegative integer. Then $f$ satisfies that

\begin{enumerate}
\item[(a)] $f(0)=0$ and $f(s+d)=-d$,
\item[(b)] $f(j-1)$ is exactly one of the values $f(j)-1$, $f(j)$, and $f(j)+1$, for $1\leq j \leq s+d$,
\item[(c)] $f(j-1)=f(j)-1$ implies that $f(j-p+1),f(j-p+2),\dots,f(j-2)\geq f(j-1)$, for $p-1 \leq j\leq s+d$.

\end{enumerate} 
\end{lem}


As depicted in \cref{fig:abacus2}, for the $(8,3)$-abacus of $\la=(6,4,3,1,1,1,1)$, we have $f(0)=0$, $f(1)=1$, $f(2)=0$, $f(3)=1$, $f(4)=1$, $f(5)=0$, $f(6)=-1$, $f(7)=-2$, and $f(8)=-3$. We see that $f$ agrees with \cref{lem:af}.

%-----------------------------------------------------------------------
\subsection{Rational Motzkin paths of type $(s,t)$}

A \emph{Motzkin path of length $s$} is a lattice path from $(0,0)$ to $(s,0)$ which stays weakly above the $x$-axis and consists of up steps $(1,1)$, down steps $(1,-1)$, and flat steps $(1,0)$. We introduce a path which generalizes the idea of the Motzkin path. 

\begin{defn} \label{def:rational}
Let \emph{free rational Motzkin path of type $(s,t)$} be a lattice path from $(0,0)$ to $(s,t)$ which consists of up steps $U=(1,1)$, down steps $D=(1,-1)$, and flat steps $F=(1,0)$. A \emph{rational Motzkin path of type $(s,t)$} is a free rational Motzkin path which stays weakly above the line $y=tx/s$.
\end{defn}

\cref{fig:Motzkin} shows all rational Motzkin paths of type $(5,-2)$. We note that if $P=P_1P_2\cdots P_{s+1}$ is a rational Motzkin path of type $(s+1,-1)$, then $P_{s+1}$ must be a down step and the subpath $\bar{P}=P_1P_2\cdots P_{s}$ is a Motzkin path of length $s$.  

\begin{figure}[ht!]
\centering
%1--------------------------------------------------------
\begin{tikzpicture}[scale=.3]
\foreach \i in {0,1,2,3,4,5}
\draw[dotted, gray!80] (\i,-2)--(\i,1);

\foreach \i in {0,1,2,3}
\draw[dotted, gray!80] (0,-2+\i)--(5,-2+\i);

\draw[->, black!80] (0,0)--(6,0);
\draw[->, black!80] (0,-3)--(0,2);
\draw[dotted, gray!80] (0,0)--(5,-2);

\node[below, black!80] at (6,0) {$x$};
\node[left,black!80] at (0,2) {$y$};

\draw[thick] (0,0)--(1,0)--(2,0)--(3,-1)--(4,-1)--(5,-2);
\end{tikzpicture}
%2-------------------------------------------------------
\begin{tikzpicture}[scale=.3]
\foreach \i in {0,1,2,3,4,5}
\draw[dotted, gray!80] (\i,-2)--(\i,1);

\foreach \i in {0,1,2,3}
\draw[dotted, gray!80] (0,-2+\i)--(5,-2+\i);

\draw[->, black!80] (0,0)--(6,0);
\draw[->, black!80] (0,-3)--(0,2);
\draw[dotted, gray!80] (0,0)--(5,-2);

\node[below, black!80] at (6,0) {$x$};
\node[left,black!80] at (0,2) {$y$};

\draw[thick] (0,0)--(1,0)--(2,0)--(3,0)--(4,-1)--(5,-2);
\end{tikzpicture}
%3---------------------------------------------------------
\begin{tikzpicture}[scale=.3]
\foreach \i in {0,1,2,3,4,5}
\draw[dotted, gray!80] (\i,-2)--(\i,1);

\foreach \i in {0,1,2,3}
\draw[dotted, gray!80] (0,-2+\i)--(5,-2+\i);

\draw[->, black!80] (0,0)--(6,0);
\draw[->, black!80] (0,-3)--(0,2);
\draw[dotted, gray!80] (0,0)--(5,-2);

\node[below, black!80] at (6,0) {$x$};
\node[left,black!80] at (0,2) {$y$};

\draw[thick] (0,0)--(1,1)--(2,0)--(3,0)--(4,-1)--(5,-2);
\end{tikzpicture}
%4--------------------------------------------------------
\begin{tikzpicture}[scale=.3]
\foreach \i in {0,1,2,3,4,5}
\draw[dotted, gray!80] (\i,-2)--(\i,1);

\foreach \i in {0,1,2,3}
\draw[dotted, gray!80] (0,-2+\i)--(5,-2+\i);

\draw[->, black!80] (0,0)--(6,0);
\draw[->, black!80] (0,-3)--(0,2);
\draw[dotted, gray!80] (0,0)--(5,-2);

\node[below, black!80] at (6,0) {$x$};
\node[left,black!80] at (0,2) {$y$};

\draw[thick] (0,0)--(1,1)--(2,0)--(3,-1)--(4,-1)--(5,-2);
\end{tikzpicture}
%5---------------------------------------------------------
\begin{tikzpicture}[scale=.3]
\foreach \i in {0,1,2,3,4,5}
\draw[dotted, gray!80] (\i,-2)--(\i,1);

\foreach \i in {0,1,2,3}
\draw[dotted, gray!80] (0,-2+\i)--(5,-2+\i);

\draw[->, black!80] (0,0)--(6,0);
\draw[->, black!80] (0,-3)--(0,2);
\draw[dotted, gray!80] (0,0)--(5,-2);

\node[below, black!80] at (6,0) {$x$};
\node[left,black!80] at (0,2) {$y$};

\draw[thick] (0,0)--(1,1)--(2,1)--(3,0)--(4,-1)--(5,-2);
\end{tikzpicture}
%6--------------------------------------------------------
\begin{tikzpicture}[scale=.3]
\foreach \i in {0,1,2,3,4,5}
\draw[dotted, gray!80] (\i,-2)--(\i,1);

\foreach \i in {0,1,2,3}
\draw[dotted, gray!80] (0,-2+\i)--(5,-2+\i);

\draw[->, black!80] (0,0)--(6,0);
\draw[->, black!80] (0,-3)--(0,2);
\draw[dotted, gray!80] (0,0)--(5,-2);

\node[below, black!80] at (6,0) {$x$};
\node[left,black!80] at (0,2) {$y$};

\draw[thick] (0,0)--(1,0)--(2,1)--(3,0)--(4,-1)--(5,-2);
\end{tikzpicture}
%-----------------------------------------------------------
\caption{All rational Motzkin paths of type $(5,-2)$}\label{fig:Motzkin}
\end{figure} 


\begin{prop}\label{prop:coremotz}
Let $s$ and $d$ be relatively prime positive integers. For $p\geq2$, there is a bijection between the set of $(s,s+d,\dots,s+pd)$-core partitions and that of rational Motzkin paths of type $(s+d,-d)$ without $UF^iU$ steps for $i=0,1,\dots,p-3$ if $p\geq 3$. 
\end{prop}



\begin{example}
If $\la=(9,5,3,2,2,1,1,1,1)$, then $\la$ is a $(5,8,11,14)$-core partition and $\beta(\la)=\{17,12,9,7,6,4,3,2,1\}$. \cref{fig:motzkin2} shows the corresponding path 
\[
P=UFUDDDDD
\] 
of $\la$, a rational Motzkin path of type $(8,-3)$ without $UU$ steps.
\end{example}

\begin{figure}[ht!]
\centering
\begin{tikzpicture}[scale=.44]
\foreach \i in {0,3,6,9,12,15,18,21,24}
\node at (\i/1.5,0) {$\i$};
\foreach \i in {8,11,14,17,20,23,26,29,32}
\node at (\i/1.5-8/1.5,1) {$\i$};
\foreach \i in {16,19,22,25,28,31,34,37,40}
\node at (\i/1.5-16/1.5,2) {$\i$};
\foreach \i in {24,27,30,33,36,39,42,45,48}
\node at (\i/1.5-24/1.5,3) {$\i$};
\foreach \i in {-8,-5,-2,1,4,7,10,13,16}
\node at (\i/1.5+8/1.5,-1) {$\i$};
\foreach \i in {-16,-13,-10,-7,-4,-1,2,5,8}
\node at (\i/1.5+16/1.5,-2) {$\i$};
\foreach \i in {-24,-21,-18,-15,-12,-9,-6,-3,0}
\node at (\i/1.5+24/1.5,-3) {$\i$};
\node at (8,4.1) {\vdots};
\node at (8,-3.9) {\vdots};
\draw (6,1) circle (12pt);
\draw (2,0) circle (12pt);
\draw (4,0) circle (12pt);
\draw (6,0) circle (12pt);
\draw (8,0) circle (12pt);
\draw (6,-1) circle (12pt);
\draw (8,-1) circle (12pt);
\draw (10,-1) circle (12pt);
\draw (12,-2) circle (12pt);
\draw (0,0)--(2,1)--(4,1)--(6,2)--(8,1)--(10,0)--(12,-1)--(14,-2)--(16,-3);
\end{tikzpicture}
\qquad \quad
\begin{tikzpicture}[scale=.44]
\node at (0,-4.8) {};
\foreach \i in {0,1,2,3,4,5,6,7,8}
\draw[dotted, gray!80] (\i,-3)--(\i,2);

\foreach \i in {0,1,2,3,4,5}
\draw[dotted, gray!80] (0,-3+\i)--(8,-3+\i);

\draw[->, black!80] (0,0)--(9,0);
\draw[->, black!80] (0,-4)--(0,3);
\draw[dotted, gray!80] (0,0)--(8,-3);

\node[below, black!80] at (9,0) {$x$};
\node[left, black!80] at (0,3) {$y$};

\draw[thick] (0,0)--(1,1)--(2,1)--(3,2)--(4,1)--(5,0)--(6,-1)--(7,-2)--(8,-3);
\end{tikzpicture}
\caption{The corresponding rational Motzkin path of the partition $(9,5,3,2,2,1,1,1,1)$}\label{fig:motzkin2}
\end{figure}

To count the number of rational Motzkin paths of type $(s+d,-d)$, we use the cyclic shifting of paths (see \cite{Bizley,Loehr}). 
For a path $P=P_1P_2\cdots P_s$, the cyclic shift $\sigma(P)$ of $P$ is $\sigma(P)=P_2P_3\cdots P_sP_1$. Iteratively, $\sigma^i(P)=P_{i+1}\cdots P_{s}P_{1}\cdots P_i$, for $i=1,\dots,s-1$ and $\sigma^0(P)=P$. 

\begin{lem}\label{lem:cyclic}
For relatively prime positive integers $s$ and $d$, let $P=P_1P_2\cdots P_{s+d}$ be a free rational Motzkin path of type $(s+d,-d)$. Then there exists a unique cyclic shift $\sigma^j(P)$ of $P$ such that $\sigma^j(P)$ is a rational Motzkin path of type $(s+d,-d)$ for $j=0,1,2,\dots,s+d-1$. 
\end{lem}


Now we can enumerate the rational Motzkin paths of type $(s+d,-d)$.

\begin{prop}\label{prop:freemotz}
Let $s$ and $d$ be relatively prime positive integers. For a given integer $0\leq k\leq \lfloor s/2\rfloor$, the number of rational Motzkin paths of type $(s+d,-d)$ having $k$ up steps is 
\[
\frac{1}{s+d}\,\binom{s+d}{k,k+d,s-2k}\,.
\]
Consequently, the number of rational Motzkin paths of type $(s+d,-d)$ is 
\[
\frac{1}{s+d}\sum_{k=0}^{\lfloor s/2 \rfloor}\binom{s+d}{k,k+d,s-2k}\,.
\]
\end{prop}


By \cref{prop:coremotz,prop:freemotz}, we give an alternating proof of \cref{thm:Wang} using path enumeration. Also, we can use the cyclic shifting for rational Motzkin paths of type $(s+d,-d)$ without $UF^iU$ steps for $i=0,1,\dots,p-3$. For a free rational Motzkin path $P$ of type $(s+d,-d)$, we say that $P$ is \emph{without cyclic $UF^iU$ steps} if there is no $UF^iU$ steps for any cyclic shift of $P$.

\begin{prop}\label{prop:mainprop}
Let $s$ and $d$ be relatively prime positive integers. For integers $p\geq 3$ and $1\leq k\leq \lfloor s/2 \rfloor$, the number of rational Motzkin paths of type $(s+d,-d)$ having $k$ up steps and no $UF^iU$ steps for all $i=0,1,\dots,p-3$ is 
\[
\frac{1}{k+d}\sum_{\ell=0}^{r}\binom{k+d}{k-\ell}\binom{k-1}{\ell}\binom{s+d-\ell(p-2)-1}{2k+d-1}\,,
\]
where $r=\min(k-1,\,\lfloor (s-2k)/(p-2) \rfloor)$.
\end{prop}


\begin{proof}
Let $\mathcal{M}_D(s+d,-d;k,p)$ be the set of free rational Motzkin paths of type $(s+d,-d)$ consisting of $k$ $U$'s, $k+d$ $D$'s, and $s-2k$ $F$'s which starts with a down step and has no cyclic $UF^iU$ steps for all $i=0,1,\dots,p-3$.  
From \cref{lem:cyclic}, there are $k+d$ cyclic shifts of a rational Motzkin path, which starts with a down step so that the number of rational Motzkin paths of type $(s+d,-d)$ with $k$ up steps and without $UF^iU$ steps for all $i=0,1,\dots,p-3$ is  
\[
\frac{1}{k+d}\,|\mathcal{M}_D(s+d,-d;k,p)|\,.
\]

For a path $P\in \mathcal{M}_D(s+d,-d;k,p)$, let $\tilde{P}$ denote the subpath obtained from $P$ by deleting all flat steps. Then, $\tilde{P}=Q_1Q_2\cdots Q_{2k+d}$ is a path consisting of $k$ $U$'s and $k+d$ $D$'s which starts with a down step. Now, we partition $\mathcal{M}_D(s+d,-d;k,p)$ into $k$ sets according to the number of $UU$ steps of $\tilde{P}$. For $0\leq \ell \leq k-1$, let $\mathcal{M}_D^{\ell}(s+d,-d;k,p)$ be the set of $P\in\mathcal{M}_D(s+d,-d;k,p)$ for which $\tilde{P}$ has $\ell$ $UU$ steps so that 
\[
|\mathcal{M}_D(s+d,-d;k,p)|=\sum_{\ell=0}^{k-1}|\mathcal{M}_D^{\ell}(s+d,-d;k,p)|\,.
\]
Hence, it is enough to show that 
\[
|\mathcal{M}_D^{\ell}(s+d,-d;k,p)|=\binom{k+d}{k-\ell}\binom{k-1}{\ell}\binom{s+d-\ell(p-2)-1}{2k+d-1}\,.
\]
We note that if a path $P$ belongs to $\mathcal{M}_D^{\ell}(s+d,-d;k,p)$, then $\tilde{P}=Q_1Q_2\cdots Q_{2k+d}$ is a path of the form 
\[
D^{a_1}U^{b_1}D^{a_2}U^{b_2}\cdots D^{a_{k-\ell}}U^{b_{k-\ell}}D^{a_{k-\ell+1}},
\]
where $a_i$ and $b_i$ are integers satisfying $a_i,b_i\geq 1$ for $i=1,2,\dots,k-\ell$, $a_{k-\ell+1}\geq0$,
\[
a_1+a_2+\cdots +a_{k-\ell+1}=k+d \qquad \text{and} \qquad b_1+b_2+\cdots+b_{k-\ell}=k\,. 
\] 
Since $P$ can be written as
\[
Q_1F^{c_1}Q_2F^{c_2}\cdots Q_{2k+d}F^{c_{2k+d}},  
\]      
where $c_i$'s are nonnegative integers satisfying 
$c_1+c_2+\cdots +c_{2k+d}=s-2k$ and $c_i\geq p-2$ if $Q_i=Q_{i+1}=U$, one can see that  
$|\mathcal{M}_D^{\ell}(s+d,-d;k,p)|$ is equal to the number of solution tuples $((a_i),(b_i),(c_i))$.
It is easy to see that the number of solutions $(a_i)$ and $(b_i)$ are  
$\binom{k+d}{k-\ell}$ and $\binom{k-1}{k-\ell-1}=\binom{k-1}{\ell}$, respectively. If $(a_i)$ and $(b_i)$ are given, then they determine $\ell$ indices $i$ such that $c_i\geq p-2$. Hence, the number of solutions $(c_i)$ is equal to the number of nonnegative integer solutions to 
$y_1+y_2+\cdots+y_{2k+d}=s-2k-\ell(p-2)$, that is $\binom{s+d-\ell(p-2)-1}{2k+d-1}$, for $\ell$ satisfying that $s+d-\ell(p-2)-1\geq 2k+d-1$. This completes the proof.
\end{proof}

\begin{rem}
The number of rational Motzkin paths of type $(s+d,-d)$ without up step and $UF^iU$ steps for all $i=0,1,\dots,p-3$ is equal to the number of rational Motzkin paths of type $(s+d,-d)$ without up step, that is $\binom{s+d}{d}/(s+d)$ by \cref{prop:freemotz}. It follows from \cref{prop:coremotz,prop:mainprop} that we have proven \cref{thm:main}.
\end{rem}

%============================================================================

\section{The $(s,s+1,\dots,s+p)$-core partitions revisited}\label{sec:3}

From \cref{thm:main}, we obtain a closed formula for the number of $(s,s+1,\dots,s+p)$-core partitions. 

\begin{cor}\label{cor:forone} 
For positive integers $s$ and $p\geq2$, the number of $(s,s+1,\dots,s+p)$-core partitions is equal to the number of Motzkin paths of length $s$ without $UF^iU$ steps for $i=0,1,\dots,p-3$ if $p\geq 3$, that is  
\[
1+\sum_{k=1}^{\lfloor s/2 \rfloor}\sum_{\ell=0}^{r}N(k,\ell+1)\binom{s-\ell(p-2)}{2k},
\]
where $N(k,\ell+1)=\frac{1}{k}\binom{k}{\ell+1}\binom{k}{\ell}=\frac{1}{k+1}\binom{k+1}{\ell+1}\binom{k-1}{\ell}$ is the Narayana number which counts the number of Dyck paths of order 
$k$ having $\ell+1$ peaks and $r=\min(k-1,\,\lfloor (s-2k)/(p-2) \rfloor)$.
\end{cor}

From \cref{thm:gendyck} and \cref{cor:forone}, we see that the $(s,p)$-generalized Dyck paths and the Motzkin paths of length $s$ without $UF^iU$ steps for $i=0,1,\dots,p-3$ if $p\geq 3$
are equinumerous. We now provide a bijection between sets of these paths.  

%-----------------------------------------------------------------------------------------
\subsection{A bijection between generalized Dyck paths and restricted Motzkin paths}\label{sec:bij}

For a given $p\geq 2$, let $P$ be a Motzkin path of length $s$ without $UF^iU$ steps for $i=0,1,\dots,p-3$ if $p\geq 3$. Then each $U$ step of $P$ is followed by either $F^jD$ for some $j\geq 0$ or $F^{k}U$ for some $k\geq p-2$. Hence, we can decompose $P$ into the following $p+1$ units:
\begin{eqnarray*}
&& \bar{U}_p:=UF^{p-2}\\
&& \bar{D}_p:=D \,\qquad\quad \text{(which is not following $UF^{i}$ for all $i=0,1,\dots,p-3$)}\\
&& \bar{F}_1:=F \qquad ~\,\quad\text{(which is not following $UF^{i}$ for all $i=0,1,\dots,p-3$)}\\
&& \bar{F}_{i}:=UF^{i-2}D \quad \text{for} ~i=2,3,\dots,p-1\,.
\end{eqnarray*}

We now construct a simple bijection $\phi$ between $(s,p)$-generalized Dyck paths and Motzkin paths of length $s$ without $UF^iU$ steps for $i=0,1,\dots,p-3$ if $p\geq 3$, for fixed $p\geq2$ as follows.

For a given Motzkin path $P$ of length $s$ without $UF^iU$ steps for $i=0,1,\dots,p-3$ if $p\geq 3$, we define $\phi(P)$ to be the path obtained from $P$ by replacing each unit $\bar{A}$ with $A$ for $A\in\{U_p,D_p,F_i\,|\,i=1,2,\dots,p-1\}$, where $U_p=(0,p)$, $D_p=(p,0)$, $F_i=(i,i)$ for $i=1,2,\dots,p-1$.

We note that if $P$ is decomposed into $k$ $\bar{U}_p$'s, $k$ $\bar{D}_p$'s, and $c_i$ $\bar{F}_i$'s for $i=1,2,\dots,p-1$, then $\phi(P)$ is a path from $(0,0)$ to $(s,s)$ since
\[
k(p-1)+k+\sum_{i=1}^{p-1}i c_i =s=kp+\sum_{i=1}^{p-1}i c_i\,.
\] 
Moreover, $P$ never goes below the $x$-axis if and only if $\phi(P)$ never goes below the line $y=x$. Hence, $\phi(P)$ is an $(s,p)$-generalized Dyck path, and therefore $\phi$ is a bijection between $(s,p)$-generalized Dyck paths and Motzkin paths of length $s$ without $UF^iU$ steps for $i=0,1,\dots,p-3$ if $p\geq 3$.

\begin{example} Let $p=4$ and $P=UFFUFFFUDDUFDUFFDD$ so that $P$ is a Motzkin path of length $18$ 
without $UU$ and $UFU$ steps. Hence, $P$ can be written as  
\[
P=\bar{U}_4\bar{U}_4\bar{F}_1\bar{F}_2\bar{D}_4\bar{F}_3\bar{U}_4\bar{D}_4\bar{D}_4,\] 
and therefore $Q=\phi(P)=U_4 U_4 F_1 F_2 D_4 F_3 U_4 D_4 D_4$ which is an $(18,4)$-generalized Dyck path. See \cref{fig:bijection}.

\begin{figure}[ht!]
\begin{center}
%------------------------------------
\begin{tikzpicture}[scale=.3]
\node[above] at (9,3) {$P$};
\foreach \i in {0,1,2,...,18}
\draw[dotted, gray!80] (\i,0)--(\i,3);

\foreach \i in {1,2,3}
\draw[dotted, gray!80] (0,\i)--(18,\i);

\draw[->, black!80] (0,0)--(19,0);
\draw[->, black!80] (0,0)--(0,4);

\node[below,black!80] at (19,0) {$x$};
\node[left,black!80] at (0,4) {$y$};

\draw[thick] (0,0)--(1,1)--(3,1)--(4,2)--(7,2)--(8,3)--(9,2)--(10,1)
--(11,2)--(12,2)--(13,1)--(14,2)--(16,2)--(17,1)--(18,0);
 
\filldraw[white] (3,1) circle (2pt)
 (6,2) circle (2pt)
 (7,2) circle (2pt)
 (9,2) circle (2pt)
 (10,1) circle (2pt)
 (13,1) circle (2pt)  
 (16,2) circle (2pt)
 (17,1) circle (2pt);
\end{tikzpicture}
%------------------------------------

\begin{tikzpicture}[scale=.3]
\node[above] at (9,18) {$Q$};
\foreach \i in {0,1,2,...,18}
\draw[dotted, gray!80] (\i,0)--(\i,18);

\foreach \i in {1,2,...,18}
\draw[dotted, gray!80] (0,\i)--(18,\i);

\draw[->, black!80] (0,0)--(19,0);
\draw[->, black!80] (0,0)--(0,19);
\draw[dotted, gray!80] (0,0)--(18,18);

\node[below,black!80] at (19,0) {$x$};
\node[left,black!80] at (0,19) {$y$};

\draw[thick] (0,0)--(0,8)--(3,11)--(7,11)--(10,14)--(10,18)--(18,18);
 
\filldraw[white] (0,4) circle (2pt)
 (0,8) circle (2pt)
 (1,9) circle (2pt)
 (3,11) circle (2pt)
 (7,11) circle (2pt)
 (10,14) circle (2pt)  
 (10,18) circle (2pt)
 (14,18) circle (2pt);
\end{tikzpicture}
%------------------------------
\end{center}
\caption{A Motzkin path and the corresponding generalized Dyck path}\label{fig:bijection}
\end{figure}

\end{example}

%-----------------------------------------------------------------------------------------
\subsection{The $(s,s+1,\dots,s+p)$-core partitions with $k$ corners}
For a partition $\la$, the number of distinct parts in $\la$ is equal to the number of corners in the Young diagram of $\la$. Many researchers were interested in corners of a partition, and Huang-Wang \cite{HW} found formulae for the number of some simultaneous core partitions with specified number of corners.

\begin{thm}[\cite{HW}, Theorems 3.1 and 3.8]
For positive integers $s$ and $k$, the number of $(s,s+1)$-core partitions with $k$ corners is the Narayana number $N(s,k+1)=\frac{1}{s}\binom{s}{k+1}\binom{s}{k}$, 
and the number of $(s,s+1,s+2)$-core partitions with $k$ corners is $\binom{s}{2k}C_k$, where $C_k$ is the $k$th Catalan number.
\end{thm}

Huang-Wang also suggested an open problem for enumerating $(s,s+1,\dots,s+p)$-cores with $k$ corners, and we give an answer to this problem.

\begin{thm}
For positive integers $s$, $p\geq2$, and $1\leq k\leq \lfloor s/2 \rfloor$, the number of $(s,s+1,\dots,s+p)$-core partitions with $k$ corners is \[
\sum_{\ell=0}^{r}N(k,\ell+1)\binom{s-\ell(p-2)}{2k}\,,
\]
where $r=\min(k-1,\,\lfloor (s-2k)/(p-2) \rfloor)$.
\end{thm}




%-----------------------------------------------------------------------------------------
\subsection{Self-conjugate $(s,s+1,\dots,s+p)$-core partitions}

A partition whose conjugate is equal to itself is called \emph{self-conjugate}. From now on, we focus on self-conjugate partitions. Ford--Mai--Sze \cite{FMS} found the number of self-conjugate $(s,t)$-core partitions.

\begin{thm}[\cite{FMS}, Theorem 1] \label{thm:FMS}
For relatively prime integers $s$ and $t$, the number of self-conjugate $(s,t)$-core partitions is 
\[
\binom{\lfloor \frac{s}{2} \rfloor + \lfloor \frac{t}{2} \rfloor}{\lfloor \frac{s}{2} \rfloor}\,.
\]
In particular, the number of self-conjugate $(s,s+1)$-core partitions is equal to the number of symmetric Dyck paths of order $s$, that is $\binom{s}{\lfloor s/2 \rfloor}$.
\end{thm}

Motivated by \cref{thm:FMS}, in a previous work \cite{CHS}, the authors showed that the number of self-conjugate $(s,s+1,s+2)$-core partitions is equal to the number of symmetric Motzkin paths of length $s$, and then gave a conjecture for the number of self-conjugate $(s,s+1,\dots,s+p)$-cores. Recently, this was proved by Yan-Yu-Zhou.

\begin{thm}[\cite{YYZ}, Theorems 2.14, 2.19, and 2.22] \label{prop:YYZ}
For positive integers $s$ and $p$, the number of self-conjugate $(s,s+1,\dots,s+p)$-core partitions is equal to the number of symmetric $(s,p)$-generalized Dyck paths.
\end{thm}

Now, we give a closed formula for the number of self-conjugate $(s,s+1,\dots,s+p)$-core partitions. Here, we give a useful lemma from the OEIS.

\begin{lem}[\cite{OEIS}, Sequence A088855] \label{lem:symdyck}
For nonnegative integers $k$ and $\ell$ such that $\ell<k$, the number of symmetric Dyck paths of order $k$ having $\ell$ $UU$ steps is 
\[
\binom{\lfloor \frac{k-1}{2} \rfloor}{\lfloor \frac{\ell}{2} \rfloor} \binom{\lfloor \frac{k}{2} \rfloor}{\lfloor \frac{\ell+1}{2} \rfloor}\,.
\]
\end{lem}

\begin{thm} \label{thm:selfone}
For positive integers $s, p\geq 2$, the number of self-conjugate $(s,s+1,\dots,s+p)$-core partitions is
\[
1+\sum_{k=1}^{\lfloor s/2 \rfloor}\sum_{\ell=0}^{r}\binom{\lfloor \frac{k-1}{2} \rfloor}{\lfloor \frac{\ell}{2} \rfloor} \binom{\lfloor \frac{k}{2} \rfloor}{\lfloor \frac{\ell+1}{2} \rfloor}\binom{\lfloor \frac{s-\ell(p-2)}{2} \rfloor}{k}\,,
\]
where $r=\min(k-1,\,\lfloor (s-2k)/(p-2) \rfloor)$.
\end{thm}




%========================================================================

\acknowledgements{
The authors are grateful to the referees for their careful reading and helpful comments. 
}
%% if you use biblatex then this generates the bibliography
%% if you use some other method then remove this and do it your own way
\printbibliography



\end{document}
