<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{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{graphicx}

\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}
\usepackage{latexsym}
\usepackage{epsf}
\usepackage{breakurl}

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

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

\newcommand{\ZZ}{\mathbb{Z}}
\newcommand{\RR}{\mathbb{R}}
\renewcommand{\SS}{\mathfrak{S}}
\newcommand{\N}{\mathcal{N}}
\renewcommand{\L}{\mathcal{L}}
\usepackage{booktabs}

\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
New Recursion Formulas for the Partition Function
}
\vskip 1cm
Teerapat Srichan, Watcharapon Pimsert\footnote{Corresponding author.},
and Vichian Laohakosol\\
Department of Mathematics\\ 
Faculty of Science\\ 
Kasetsart University\\
Bangkok 10900\\ 
Thailand\\
\href{mailto:fscitrp@ku.ac.th}{\tt fscitrp@ku.ac.th}\\ 
\href{mailto:fsciwcrp@ku.ac.th}{\tt fsciwcrp@ku.ac.th}\\ 
\href{mailto:fscivil@ku.ac.th}{\tt fscivil@ku.ac.th}\\
\end{center}

\vskip .2in

\begin{abstract}
We derive several new recursion formulas for the unrestricted partition function as applications of a general recursion formula for a novel restricted partition function.
\end{abstract}

\section{Introduction and results}
A  partition of a positive  integer $n$, \cite[Chapter 14]{apostol}, is a finite sequence
of positive integers $\lambda_1,\lambda_2,\dots,\lambda_m$  such that  
$$\lambda_1 +\lambda_2+\cdots+ \lambda_m=n.$$ 
The $\lambda_i$'s are called the parts of the partition. The number of parts is unrestricted, repetition is allowed and the order of the parts is not taken into account. The corresponding  partition function $p(n)$ is defined as the number of unordered partitions of $n$. 
Some well-known values of $p(n)$ are (\cite[\seqnum{A000041}]{oeis})
\begin{align}		
&amp;p(-n)=0\ (n\in\mathbb{N}),\  p(0)=1\  \text{(by convention)}, \notag\\	
&amp;p(1)=1,  p(2)=2,  p(3)=3,  p(4)=5,  p(5)=7,  p(6)=11,	\notag\\
&amp;p(7)=15, p(8)=22, p(9)=30, p(10)=42, p(11)=56.	\label{pn}
\end{align}
Finding explicit formulas for  $p(n)$ is  one of the most fundamental problems in additive number theory, and there have appeared a good deal of formulas used to compute $p(n)$. More recent ones in the spirit of our work here are e.g., the two works in \cite{m,ms}. Added to this list, we present here a seemingly new recursion formula connecting the unrestricted partition function $p(n)$  with a restricted partition function $P(n,k)$; see also \cite[\seqnum{A008284}]{oeis}. Throughout, $\mathbb{N}$ denotes the set of all positive integers and  $\mathbb{N}_0:=\mathbb{N}\cup\{0\}$.
\begin{definition}
Let $n\in\mathbb{N}$, and $k\in\mathbb{N}_0$. Define
\begin{displaymath}
 P(n,k) = \begin{cases}
\text{the number of  partitions $(\lambda_1,\lambda_2, \dots)$ of $n$ with  $k&lt;\lambda_i&lt;n$},&amp; \text{if}\  0&lt;k&lt;n; \\ 
0,&amp;\text{otherwise}.
 \end{cases}
 \end{displaymath}
\end{definition}
From this definition, note that $P(n,k)=0$, when $k&gt;\left\lfloor n/2 \right\rfloor-1$. Moreover, for a fixed $n\in\mathbb{N}$, the restricted partition $P(n,k)$ is a decreasing function in $k$. Our main result reads as follows.
\begin{theorem}
\label{theorem}
Let $p(0)=1$ and  define $p(n)$ to be $0$ if $n&lt;0$. Then for $n\geq 4$ and $k \geq 1$ we have 
\begin{equation}\label{e1}
\sum_{i=0}^\infty a_{k,i}\;p(n-i)
= P(n,k)-P(n-1,k),
\end{equation}
where  the coefficients $a_{k,i}$  are obtained from the expansion
\begin{align}\label{e3}
\left( x^n-2x^{n-1}+x^{n-2}\right) \prod_{i=2}^{k} \left( 1-x^{-i} \right)=\sum_{i=0}^\infty a_{k,i}x^{n-i},
\end{align}
where empty product is taken to be 1.
\end{theorem}
Comparing with existing schemes, Theorem \ref{theorem} can be employed competitively to determine the values of $p(n)$ efficiently subject to the ease of computing $P(n,k)-P(n-1,k)$ and $a_{k,i}$.  When $k$ is large, the expression $P(n,k)-P(n-1,k)$ is easy to find while  the coefficients $a_{k,i}$ are not (because the product expansion in \eqref{e3} is lengthy). In the last section, several applications of Theorem \ref{theorem} for both large and small values of $k$ are worked out. In addition, optimal values of $k$, in terms of $n$, which render easy and effective applications of Theorem \ref{theorem} are derived.
\section{Lemmas}
The following lemma, whose simple straightforward computation check is omitted, provides information for some particular cases needed in the proof of Theorem \ref{theorem}.  
 \begin{lemma}\label{lem2.3}
 For $k\in\mathbb{N}$, we have
$$P(2k+1,k)=0,\  P(2k+2, k)=1,\  P(2k+3, k)=1.$$
\end{lemma}
The main ingredient in our proof of Theorem \ref{theorem} is:
\begin{lemma}\label{lem2.4}
For given $k, n\in\mathbb{N}$ with $n&gt;k$, we have
\begin{align*}
P(n,k)=P(n,k+1)+P(n-k-1,k)+1.
\end{align*}
\end{lemma}
\begin{proof} 
Let $A$ be the set of unrestricted partitions of $n$ having parts $&gt;k+1$ but $&lt; n$, and $B$  the set of unrestricted partitions of $n$ having parts $&gt; k$ with at least one part being $k+1$. By definition, we have
\begin{align}\label{e6}
P(n,k)=|A|+|B|.
\end{align}
By definition, we have
$$|A|=P(n,k+1),$$ 
while  $|B|$ is equal to the number of unrestricted partitions of $n-k-1$ having parts $&gt; k$ and $&lt;n$ plus the partition $n=(n-k-1)+(k+1)$. 
Putting these values into \eqref{e6}, Lemma \ref{lem2.4} follows.
\end{proof}
The next lemma relates the partition function $p(n)$ with the initial value of the function $P(n,k)$.
\begin{lemma}	\label{lem5}
For $n\geq 2,$ we have 
\begin{align}	\label{forkis1}
p(n)=P(n,1)+p(n-1)+1.
\end{align}
\end{lemma}
\begin{proof}
The case $n=2$ follows immediately from the numerical values $p(2)=2,\ p(1)=1$ and $P(2,1)=0$.

For $n\geq 3$, the proof follows from the observation that the set of all unrestricted partitions of $n$ comprises $3$ disjoint classes. The first class consists of all partitions having parts belonging to $\{ 2, 3, \ldots ,n-1\}$, while the second class contains all partitions having at least one part being $1$, and the last class is simply the set $\{ n\}$. 
\end{proof}

Our next lemma relates $P(n,k)$ with the partition function $p_s(n)$ which counts \emph{the number of partitions of $n$ into $s$ parts} (\cite{barnabei,carufel}).
\begin{lemma}	\label{lem6}
Let $m,k\in\mathbb{N}$. We have 
\begin{align}\label{elem6}
P(mk+r,k)=\sum_{i=2}^{m-1}p_i((m-i)k+r),
\end{align}
where $0\leq r&lt;k$.
\end{lemma}
\begin{proof}
For  $m\in\{1,2\}$, the relation \eqref{elem6} holds trivially because $P(k,k)=P(2k,k)=P(2k+1,k)=0$, and the right-hand sum is empty. Consider now  $m\geq 3$. By  definition, we can write 
\begin{align}	\label{elem7}
P(mk+r,k)=\sum_{i=2}^{m-1}P_i(mk+r,k),
\end{align}
where 
\begin{displaymath}
 P_i(n,k) = \begin{cases}
\text{the number of  partitions $(\lambda_1,\lambda_2, \dots, \lambda_i)$ of $n$ with  $k&lt;\lambda_{\bullet}&lt;n$,}&amp; \text{if}\  0&lt;k&lt;n; \\ 
0,&amp;\text{otherwise}.\\
 \end{cases}
 \end{displaymath}
For a fixed number of parts $i\in\{2,3,\ldots,m-1\}$, to count $P_i(mk+r,k)$, we first delete $k$ from each of the $i$ parts. This gives rise to an equivalent counting of an unordered partition of $mk+r-ik=(m-i)k+r$, yielding $P_i(mk+r,k)=p_i((m-i)k+r)$.
\end{proof}

The following lemma details precise values and certain relations of $p_s(n)$ for small $s$. Trivial proofs of the first two assertions are omitted while the remaining two assertions are quoted from \cite{barnabei}.
\begin{lemma}	\label{lem7}
For $n\geq 0$, we have
\begin{itemize}
\item[1)]	$p_2(n)=\left\lfloor n/2\right\rfloor$.
\item[2)]	$p_3(n)=\left\langle  n^2/12 \right\rangle$,
where $\left\langle z\right\rangle$ denotes the nearest integer of $z\in\mathbb{R}$.
\item[3)] (\cite[Proposition 5]{barnabei})
For $n\geq 3$, we have
$$p_3(n)-p_3(n-1)=\left\lfloor \frac{n+1}{2}\right\rfloor-\left\lfloor \frac{n+2}{3}\right\rfloor.$$
\item[4)] (\cite[Proposition 9]{barnabei})
For $n\geq 5$, we have
$$p_4(n)-p_4(n-1)=p_3(\chi(n)),
\text{where}\  \chi(n) = \begin{cases}
\frac{n}{2}+1,&amp; \text{if}\  2\mid n; \\ 
\frac{n-1}{2},&amp;\text{otherwise}.
 \end{cases}$$
\end{itemize}
\end{lemma}
\section{Proof of Theorem \ref{theorem}}
From Lemma \ref{lem2.4}, we have 
\begin{equation}\label{pnk1}
P(n,k+1)=P(n,k)-P(n-k-1,k)-1,
\end{equation} 
which shows that the second argument can be successively reduced to the case $k=1$, i.e., each $P(n,k)$ can be uniquely written as a $\mathbb{Z}$-linear combination of finitely many elements taken from $P(n,1),  P(n-1,1),  P(n-2,1),\ldots$. Applying the result of Lemma \ref{lem5}, the values $P(n,1), P(n-1,1), P(n-2,1),\ldots$ can be furthered uniquely reduced to the values of the unrestricted partition function $p(n),p(n-1),p(n-2),\ldots$, which implies that each $P(n,k)$ can be uniquely written as a $\mathbb{Z}$-linear combination of finitely many elements taken from $p(n),p(n-1),p(n-2),\ldots$. To determine this explicitly, it is more convenient to write
\begin{align}	\label{q1}
P(n,k)-P(n-1,k)=\sum_{i=0}^\infty a_{k,i}p(n-i),
\end{align}
where $a_{k,i}\in \mathbb{Z}$; this sum is finite because $p(m)=0$ for integers $m&lt;0$. To compute the coefficients $a_{k,i}$, we resort to the use of generating series
\begin{equation}\label{gen}
f_k^n(x)=\sum_{i=0}^\infty a_{k,i}x^{n-i}. 
\end{equation}
We claim that
\begin{equation}\label{fkn}
f_1^n(x)=x^n-2x^{n-1}+x^{n-2},\ f_k^n(x)=(x^n-2x^{n-1}+x^{n-2})\prod_{i=2}^k(1-x^{-i})\ (2\leq k&lt;n).
\end{equation}
For the case $k=1$, Lemma \ref{lem5} gives
\begin{align*}
P(n,1)-P(n-1,1)&amp;=(p(n)-p(n-1)-1)-(p(n-1)-p(n-2)-1)\\
&amp;= p(n)-2p(n-1)+p(n-2),
\end{align*}
yielding $a_{1,0}=1, a_{1,1}=-2, a_{1,2}=1$ and $a_{1,n}=0$ for all $n\geq 3$, and so \eqref{fkn} holds when $k=1$. For $2\leq k&lt;n$, using Lemma \ref{lem2.4}, we get
\begin{align*}
&amp;P(n,k-1)-P(n-1,k-1)\\
&amp;=\left(P(n,k) + P(n-k,k-1) + 1\right)-\left(P(n-1,k) + P(n-1-k,k-1) +1\right)\\
&amp;=\left(P(n,k)-P(n-1,k)\right) + \left(P(n-k,k-1)-P(n-k-1,k-1)\right).
\end{align*}
Using \eqref{q1} to replace the differences of two restricted partitions, we get
\begin{equation} \label{eqpn}
\sum_{i=0}^\infty a_{k-1,i}\;p(n-i)=\sum_{i=0}^\infty a_{k,i}\; p(n-i)+\sum_{i=0}^\infty a_{k-1,i} \;p(n-k-i).
\end{equation}
We claim now that 
\begin{equation}\label{fk1}
f_{k-1}^n(x)=f_k^n(x)+f_{k-1}^{n-k}(x).
\end{equation}
Using \eqref{gen}, the relation \eqref{fk1} holds if and only if the following system of equations holds
\begin{align*}
a_{k-1,i}&amp;=a_{k,i} \qquad\qquad\quad\ \ (i=0,1,\ldots,k-1)\\
a_{k-1,i}&amp;=a_{k,i}+a_{k-1,i-k} \quad(i=k,k+1,k+2,\ldots).			
\end{align*}
This system is identical with the one obtained from \eqref{eqpn} by equating the coefficients of $p(n-i)$. As the coefficients $a_{j,i}$ are uniquely determined, the system of equation does indeed hold which in turn affirms the relation \eqref{fk1}. Since
\begin{align*}
f_{k-1}^{n-k}(x)= a_{k-1,0}x^{n-k}+a_{k-1,1}x^{n-k-1}+\cdots
=\frac{1}{x^k}f_{k-1}^n(x),
\end{align*}
substituting this into \eqref{fk1}, we get  $f_k^n(x) = \left( 1-\frac{1}{x^k}\right)f_{k-1}^n(x)$. Hence,
\begin{align*}
f_2^n(x)&amp;=\left( 1-\frac{1}{x^2}\right)f_1^n(x),
\ldots,\\
f_k^n(x)&amp;=\left( 1-\frac{1}{x^k}\right)\left( 1-\frac{1}{x^{k-1}}\right)\cdots\left( 1-\frac{1}{x^2}\right)f_1^n(x)=\left( x^n-2x^{n-1}+x^{n-2}\right) \prod_{i=2}^k \left( 1-x^{-i} \right),
\end{align*}
which proves the second assertion in \eqref{fkn}.
\section{Applications} 
To apply Theorem \ref{theorem} to compute values of $p(n)$ subject to the knowledge of preceding values, we subdivide our treatment into two separate subcases corresponding to large and small values of $k$ relative to $n$. 
\subsection{The case of large $k$}
Here, we obtain several applications for $k=\left\lfloor n/3\right\rfloor, \left\lfloor n/4\right\rfloor$ and $\left\lfloor n/5\right\rfloor$. 
In these cases, explicit formulas for the right-hand expression of \eqref{e1} can be easily determined using Lemmas \ref{lem6} and \ref{lem7}. 
\begin{theorem}\label{theorem2}
For $n\geq 4$, we have
\begin{equation}\label{e12}
\sum_{i=0}^\infty a_{\left\lfloor n/3\right\rfloor,i}\;p(n-i)= \begin{cases}
1, &amp; \text{if $n$ is even;}\\
0, &amp; \text{if $n$ is odd.}
\end{cases}
\end{equation}
where  the coefficients $a_{\left\lfloor n/3 \right\rfloor,i}$  are obtained from the expansion
\begin{align}\label{e32}
\left( x^n-2x^{n-1}+x^{n-2}\right) \prod_{i=2}^{\left\lfloor n/3\right\rfloor} \left( 1-x^{-i} \right)=\sum_{i=0}^\infty a_{\left\lfloor n/3 \right\rfloor,i}x^{n-i},
\end{align}
with empty product being taken as 1.
\end{theorem}
\begin{proof}
Write $n=3k+r$ for some $k\in\mathbb{N}\cup\{0\}$ and $0\leq r&lt;3$. From Lemma \ref{lem6} and Lemma \ref{lem7} part 1), we get 
\begin{align}\label{cor11}
&amp;P(n,k)-P(n-1,k)=P(3k+r,k)-P(3k+r-1,k)\notag\\
&amp;=p_2(k+r)-p_2(k+r-1)
=\left\lfloor \frac{k+r}{2} \right\rfloor-\left\lfloor \frac{k+r-1}{2} \right\rfloor
= 
\begin{cases}
1,&amp; \text{if}\ k+r\ \text{is even;}\\
0,&amp; \text{if}\ k+r\ \text{is odd.}
\end{cases}
\end{align}
Applying Theorem \ref{theorem} with $k=\left\lfloor n/3 \right\rfloor$ and using \eqref{cor11}, the result follows.
\end{proof}
\begin{example}
As an illustration, we use Theorem \ref{theorem2}  to  compute $p(9)$.  Here, $n=9,\ k= \left\lfloor n/3\right\rfloor=3$. The left-hand expression of \eqref{e32} is 
\begin{align*}
(x^{9}-2x^{8}+x^7)\prod_{i=2}^{3}(1-x^{-i})=x^{9}-2x^8+x^6+x^5-2x^3+x^2,
\end{align*}
so that 
\begin{align*}
a_{3,0}=1, \ a_{3,1}=-2, \ a_{3,2}=0, \ a_{3,3}=1, \ a_{3,4}=1, \ a_{3,5}=0, \ a_{3,6}=-2,\ a_{3,7}=1.
\end{align*}
From \eqref{e12}, we have
$$0=p(9) -2p(8) + p(6) + p(5) - 2p(3) + p(2),$$
and using known values from \eqref{pn}, we get 
\begin{align*}
p(9)&amp;=2p(8)-p(6)-p(5)+2p(3)-p(2)=2(22)-11-7+2(3)-2=30.
\end{align*}
Similarly, to find  $p(10)$ and $p(11)$, we take  $n=10$ and $n=11$ yielding in both cases $k=\left\lfloor n/3\right\rfloor = 3$. Using \eqref{e12}, the left-hand expressions of \eqref{e32} are, respectively, 
$$x^{10}-2x^9+x^7+x^6-2x^4+x^3 \ \text{and}\ x^{11}-2x^{10}+x^8+x^7-2x^5+x^4.$$ 
In view of \eqref{e12} and using known preceding values from \eqref{pn}, we get
\begin{align*}
p(10)&amp;=2p(9)-p(7)-p(6)+2p(4)-p(3)+1=2(30)-15-11+2(5)-3+1=42\\
p(11)&amp;=2p(10)-p(8)-p(7)+2p(5)-p(4)=2(42)-22-15+2(7)-5=56.
\end{align*}
\end{example}

For the remaining two cases, it is more convenient to work with $k$ and $r$ instead of $n$.  
\begin{theorem}\label{theorem3}
For $k\geq 1$ and $0\leq r&lt;4$, we have 
\begin{equation}\label{e13}
\sum_{i=0}^\infty a_{k,i}\;p(4k+r-i)
= \left\lfloor \frac{r}{2}\right\rfloor-\left\lfloor \frac{r-1}{2}\right\rfloor+\left\lfloor \frac{k+r+1}{2}\right\rfloor-\left\lfloor \frac{k+r+2}{3}\right\rfloor
\end{equation}
where  the coefficients $a_{k,i}$  are obtained from the expansion
\begin{align}\label{e33}
\left( x^{4k+r}-2x^{4k+r-1}+x^{4k+r-2}\right) \prod_{i=2}^{k} \left( 1-x^{-i} \right)=\sum_{i=0}^\infty a_{k,i}x^{4k+r-i},
\end{align}
with empty product being taken as 1.
\end{theorem}
\begin{proof}
Writing $n=4k+r,\  0\leq r&lt;4$, using
Lemma \ref{lem6} and Lemma \ref{lem7} parts 1) and 3), we have
\begin{align*}
&amp;P(4k+r,k)-P(4k+r-1,k)=p_2(2k+r)-p_2(2k+r-1)+p_3(k+r)-p_3(k+r-1)\\
&amp;=\left\lfloor \frac{2k+r}{2} \right\rfloor-\left\lfloor \frac{2k+r-1}{2} \right\rfloor+\left\lfloor \frac{k+r+1}{2} \right\rfloor-\left\lfloor \frac{k+r+2}{3} \right\rfloor\\
&amp;=\left\lfloor \frac{r}{2} \right\rfloor-\left\lfloor \frac{r-1}{2} \right\rfloor+\left\lfloor \frac{k+r+1}{2} \right\rfloor-\left\lfloor \frac{k+r+2}{3} \right\rfloor.
\end{align*}
\end{proof}
\begin{example}
We illustrate the use of Theorem \ref{theorem3}  to  compute $p(8)$.  Here $n=8, k=2$ and $r=0$. The left-hand expression of \eqref{e33} is 
\begin{align*}
(x^{8}-2x^{7}+x^6)\prod_{i=2}^{2}(1-x^{-i})=x^{8}-2x^7+2x^5-x^4,
\end{align*}
so that 
\begin{align*}
a_{2,0}&amp;=1,\ a_{2,1}=-2,\ a_{2,2}=0,\ a_{2,3}=2,\ a_{2,4}=-1.
\end{align*}
In view of \eqref{e13}, we have
$$1=\left\lfloor \frac{0}{2} \right\rfloor-\left\lfloor \frac{0-1}{2} \right\rfloor+\left\lfloor \frac{2+0+1}{2} \right\rfloor-\left\lfloor \frac{2+0+2}{3} \right\rfloor=p(8) -2p(7) +2p(5) - p(4),$$
and using known values from \eqref{pn}, we get 
\begin{align*}
p(8)&amp;=2p(7)-2p(5)+p(4)+1=2(15)-2(7)+5+1=22.
\end{align*}
Similarly, to find   $p(9)$, $p(10)$ and $p(11)$, we take  $n=9, 10$ and $n=11$. In the three cases we have $r=1,2,3$, and the left-hand expressions of \eqref{e33} are, respectively,
$$x^{9}-2x^8+2x^6-x^5,\ x^{10}-2x^9+2x^7-x^6\ \text{and}\ x^{11}-2x^{10}+2x^8-x^7.$$
In view of \eqref{e13}, we have
\begin{align*}
&amp;1=\left\lfloor \frac{1}{2} \right\rfloor-\left\lfloor \frac{1-1}{2} \right\rfloor+\left\lfloor \frac{2+1+1}{2} \right\rfloor-\left\lfloor \frac{2+1+2}{3} \right\rfloor=p(9) -2p(8) +2p(6) - p(5),\\
&amp;1=\left\lfloor \frac{2}{2} \right\rfloor-\left\lfloor \frac{2-1}{2} \right\rfloor+\left\lfloor \frac{2+2+1}{2} \right\rfloor-\left\lfloor \frac{2+2+2}{3} \right\rfloor=p(10) -2p(9) +2p(7) - p(6),\\
&amp;1=\left\lfloor \frac{3}{2} \right\rfloor-\left\lfloor \frac{3-1}{2} \right\rfloor+\left\lfloor \frac{2+3+1}{2} \right\rfloor-\left\lfloor \frac{2+3+2}{3} \right\rfloor=p(11) -2p(10) +2p(8) - p(7),
\end{align*}
and using known values from \eqref{pn}, we get 
\begin{align*}
p(9)&amp;=2p(8)-2p(6)+p(5)+1=2(22)-2(11)+7+1=30\\
p(10)&amp;=2p(9)-2p(7)+p(6)+1=2(30)-2(15)+11+1=42\\
p(11)&amp;=2p(10)-2p(8)+p(7)+1=2(42)-2(22)+15+1=56.
\end{align*}

In passing, observe that to compute $p(11)$, using Theorem \ref{theorem2} we need 5 preceding partitions terms, while  using Theorem \ref{theorem3} we need only 3 terms, which indicates that Theorem \ref{theorem3} seems more effective than Theorem \ref{theorem2}.
\end{example}
\begin{theorem}\label{theorem4}
For $k\geq 1$ and $0\leq r&lt;5$, we have 
\begin{align}
\sum_{i=0}^\infty a_{k,i}\;p(5k+r-i)
&amp;= \Big(k+\left\lfloor \frac{k+r}{2} \right\rfloor+\left\lfloor \frac{r+1}{2}\right\rfloor+\left&lt; \frac{(\chi(k+r))^2}{12} \right&gt;\Big)\notag\\
&amp;- \Big(\left\lfloor \frac{k+r-1}{2} \right\rfloor+\left\lfloor \frac{2k+r+2}{3} \right\rfloor\Big) \label{e14}
\end{align}
where  the coefficients $a_{k,i}$  are obtained from the expansion
\begin{align}\label{e34}
\left( x^{5k+r}-2x^{5k+r-1}+x^{5k+r-2}\right) \prod_{i=2}^{k} \left( 1-x^{-i} \right)=\sum_{i=0}^\infty a_{k,i}x^{5k+r-i}
\end{align}
with empty product being taken as 1; the symbols $\left\langle z\right\rangle$ and $\chi(n)$ are defined as in Lemma \ref{lem7} parts 2) and 4). 
\end{theorem}
\begin{proof}
Writing $n=5k+r,\  0\leq r&lt;5$, using Lemma \ref{lem6} and Lemma \ref{lem7} parts 1), 2), 3) and 4), we have
\begin{align*}													
&amp;P(5k+r,k)-P(5k+r-1,k)\\
&amp;=p_2(3k+r)-p_2(3k+r-1)+p_3(2k+r)-p_3(2k+r-1)+p_4(k+r)-p_4(k+r-1)\\
&amp;=\left\lfloor \frac{3k+r}{2} \right\rfloor-\left\lfloor \frac{3k+r-1}{2} \right\rfloor+\left\lfloor \frac{2k+r+1}{2} \right\rfloor-\left\lfloor \frac{2k+r+2}{3} \right\rfloor + p_3(\chi(k+r))\\
&amp;=\left\lfloor \frac{k+ r}{2} \right\rfloor-\left\lfloor \frac{k+r-1}{2} \right\rfloor+ k +\left\lfloor \frac{r+1}{2} \right\rfloor-\left\lfloor \frac{2k+r+2}{3} \right\rfloor+\left&lt; \frac{(\chi(k+r))^2}{12} \right&gt;.
\end{align*}
\end{proof}
\begin{example}
We illustrate the use of Theorem \ref{theorem4}  to  compute $p(10), p(11), p(12), p(13)$ and $p(14)$ with the following respective values:
\begin{align*}
&amp;n=10,\,\, k=2,\,\, r=0;\qquad n=11,\,\, k=2,\,\, r=1;\qquad n=12,\,\, k=2,\,\, r=2;\\
&amp;n=13,\,\, k=2,\,\, r=3;\qquad n=14,\,\, k=2,\,\, r=4.
\end{align*} 
The left-hand expression of \eqref{e34} is 
\begin{align*}
(x^{n}-2x^{n-1}+x^{n-2})\prod_{i=2}^{2}(1-x^{-i})=x^{n}-2x^{n-1}+2x^{n-3}-x^{n-4},
\end{align*}
so that \  $a_{2,0}=1,\ a_{2,1}=-2,\ a_{2,2}=0,\ a_{2,3}=2,\ a_{2,4}=-1$.
From \eqref{e14}, we have
\begin{align*}
\sum_{i=0}^\infty a_{2,i}\;p(10+r-i)&amp;= \Big(2+\left\lfloor \frac{2+r}{2} \right\rfloor+\left\lfloor \frac{r+1}{2} \right\rfloor+\left&lt; \frac{(\chi(2+r))^2}{12}\right&gt;\Big)\\\notag
&amp;- \Big(\left\lfloor \frac{2+r-1}{2}\right\rfloor+\left\lfloor \frac{4+r+2}{3}\right\rfloor\Big)=: S_r.
\end{align*}
By simple computation, we get
$$S_0=1,\quad S_1=1,\quad S_2=3,\quad S_3=1,\quad S_4=3.$$
Using known values from \eqref{pn}, we get 
\begin{align*}
p(10)&amp;=2p(9)-2p(7)+p(6)+1=2(30)-2(15)+11+1=42\\
p(11)&amp;=2p(10)-2p(8)+p(7)+1=2(42)-2(22)+15+1=56\\
p(12)&amp;=2p(11)-2p(9)+p(8)+3=2(56)-2(30)+22+3=77\\
p(13)&amp;=2p(12)-2p(10)+p(9)+1=2(77)-2(42)+30+1=101\\
p(14)&amp;=2p(13)-2p(11)+p(10)+3=2(101)-2(56)+42+3=135.
\end{align*}
\end{example}
\subsection{The case of small $k$}
In this case, using a trick, the right-hand side of \eqref{e1} can be slightly improved.
\begin{theorem}
\label{theorem5}
For $n\geq 4$ and $k\geq 1$, we have 
\begin{align}	\label{e15}
\sum_{i=0}^\infty a_{k,i}\;p(n-i)=\sum_{i=2}^{\left\lfloor n/(k+1)\right\rfloor} \left(p_i(n-ki)-p_i(n-ki-1)\right),
\end{align}
where  the coefficients $a_{k,i}$  are obtained from the expansions \eqref{e3}.
\end{theorem}
\begin{proof}
Write $n=mk+r,\ 0\leq r&lt; k$. From Lemma \ref{lem6}, we have 
\begin{align}\label{cor5}
P(n,k)&amp;=P(mk+r,k)=\sum_{i=2}^{m-1}p_i((m-i)k+r)
=\sum_{i=2}^{\left\lfloor n/(k+1)\right\rfloor}p_i(n-ki);
\end{align} 
since $p_s(n)$ counts the number of partitions of $n$ into $s$ parts, we must have $s\leq n$. This enables us to replace the upper limit of summation $m-1=\left\lfloor n/k\right\rfloor-1$ by $\left\lfloor n/(k+1)\right\rfloor$ which is better when  $k$ is small compared to $n$. Using Theorem \ref{theorem} and \eqref{cor5}, we have
\begin{align*}
\sum_{i=0}^\infty a_{k,i}\;p(n-i)&amp;=\sum_{i=2}^{\left\lfloor n/(k+1) \right\rfloor}p_i(n-ki)-\sum_{i=2}^{\left\lfloor (n-1)/(k+1) \right\rfloor}p_i(n-1-ki),
\end{align*}
and the result follows from the observation that lengthening the last upper limit of summation yielding only zero value.
\end{proof}
\begin{example}
We illustrate the use of Theorem \ref{theorem5}  to  compute  $p(14)$. If we take $k=2$, then $\left\lfloor n/(k+1)\right\rfloor=\left\lfloor 14/3\right\rfloor=4$. Thus, \eqref{e15} and Lemma \ref{lem7} give
\begin{align*}
\sum_{i=0}^\infty a_{2,i}\;p(14-i)
&amp;= \sum_{i=2}^{4} \left(p_i(14-2i)-p_i(13-2i)\right)\\
&amp;=p_2(10)-p_2(9)+p_3(8)-p_3(7)+p_4(6)-p_4(5)\\
&amp;=\left\lfloor 10/3\right\rfloor-\left\lfloor 9/2\right\rfloor+\left\lfloor 9/2\right\rfloor-\left\lfloor 10/2\right\rfloor+p_3(\chi(6))
=3.
\end{align*}
In view of \eqref{e3}, we have
\begin{align*}
\left( x^{14}-2x^{13}+x^{12}\right) \prod_{i=2}^{2} \left( 1-x^{-i} \right)=x^{14}-2x^{13}+2x^{11}-x^{10}=\sum_{i=0}^\infty a_{2,i}\;x^{14-i}.
\end{align*}
Theorem \ref{theorem5} yields
\begin{align*}
p(14)&amp;=2p(13)-2p(11)+p(10)+3=2(101)-2(56)+42+3=135.
\end{align*}
If we take $k=3$, then $\left\lfloor 14/(3+1)\right\rfloor=3$. From \eqref{e15}, we have
\begin{align*}
\sum_{i=0}^\infty a_{3,i}\;p(14-i)
&amp;= \sum_{i=2}^{3} \left(p_i(14-3i)-p_i(13-3i)\right)=p_2(8)-p_2(7)+p_3(5)-p_3(4)=2.
\end{align*}
In view of \eqref{e3}, we have
\begin{align*}
\left( x^{14}-2x^{13}+x^{12}\right) \prod_{i=2}^{3} \left( 1-x^{-i} \right)=x^{14}-2x^{13}+x^{11}+x^{10}-2x^8+x^7=\sum_{i=0}^\infty a_{3,i}\;x^{14-i}.
\end{align*}
Theorem \ref{theorem5} and preceding values give 
\begin{align*}
p(14)&amp;=2p(13)-p(11)-p(10)+2p(8)-p(7)+2\\
&amp;=2(101)-(56)-42+2(22)-15+2=135.
\end{align*}
\end{example}

\section{Acknowledgments}
The authors gratefully acknowledge a financial support under the Basic Research Fund (BRF) provided by the Faculty of Science, Kasetsart University.

\bibliographystyle{jis}
\begin{thebibliography}{9}
\bibitem{apostol} 
T. M. Apostol, {\em Introduction to Analytic Number Theory}, Springer,
1976.

\bibitem{barnabei} 
M. Barnabei, F. Bonetti, and M. Silimbani, Bijections and recurrences for
integer partitions into a bounded number of parts. {\em Appl. Math. Lett.}
{\bf 22}  (2009), 297--303.

\bibitem{carufel} 
J. L. De Carufel, A few identities involving partitions with a fixed
number of parts, {\em Ars Comb.} {\bf 68} (2003), 125--130.

\bibitem{m}
M. Merca, A generalization of Euler's pentagonal number recurrence for
the partition function, {\em Ramanujan J.} {\bf 37} (2015), 589--595.

\bibitem{ms}
M. Merca and M. D. Schmidt, The partition function $p(n)$ in terms of the
classical M\"obius function, {\em Ramanujan J.} {\bf 49} (2019), 87--96.

\bibitem{oeis}
N. J. A.~Sloane et al., The On-line Encyclopedia of Integer Sequences,
2020. Available at \url{https://oeis.org/}.

\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2020 {\it Mathematics Subject Classification}: Primary  05A17; Secondary 11P81.

\noindent \emph{Keywords:} recursion formula, restricted partition function.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A000041} and \seqnum{A008284}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received March 23 2021; revised version received May 20 2021.
Published in {\it Journal of Integer Sequences}, May 20 2021.

\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>