\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{float}


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

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


\usepackage{fullpage}

\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}}}
\def\modd#1 #2{#1\ \mbox{\rm (mod}\ #2\mbox{\rm )}}

\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 Congruence Properties for the \\
\vskip .1in
Delannoy Triangle Coefficients
}
\vskip 1cm
\large
Chahinaze Djadi\\
Faculty of Mathematics\\
USTHB, ATN Laboratory\\
El Alia, Po.~Box 32\\
Bab Ezzouar, 16111\\
Algiers\\
Algeria\\
\href{mailto:cdjadi@usthb.dz}{\tt cdjadi@usthb.dz}  and 
\href{mailto:djadi.chanez98@gmail.com}{\tt djadi.chanez98@gmail.com}
\vskip 0,5cm
\large
Hac\`{e}ne Belbachir\\
Faculty of Mathematics\\
USTHB, RECITS Laboratory\\
El Alia, Po.~Box 32\\
Bab Ezzouar, 16111\\
Algiers\\
Algeria\\
{\href{mailto:hbelbachir@usthb.dz}{\tt hbelbachir@usthb.dz} \textrm{ and } \href{mailto:hacenebelbachir@gmail.com}{\tt hacenebelbachir@gmail.com}} \\
\end{center}

\vskip .2 in
\begin{abstract}
Let $\binom{n}{k}_{[2]}$ denote the entry in the $n$th row and $k$th column of the Delannoy triangle. In the present paper, we extend Wolstenholme's theorem to Delannoy triangle coefficients: for any prime $p\geq 5$, we determine $\binom{2p}{p}_{[2]}$, $\binom{2p-1}{p-1}_{[2]}$ and, more generally, $\binom{np-1}{p-1}_{[2]}$ modulo $p^3$ in terms of the Fermat quotient $q_p(2)$. We also establish, for any odd prime $p$, the congruence
$\sum_{0\leq k\leq n\leq p-1}\binom{n}{k}_{[2]}\equiv \bigl(\frac{2}{p}\bigr)$ (mod $p$),
where $\bigl(\frac{\cdot}{p}\bigr)$ is the Legendre symbol.
\end{abstract}

\section{Introduction}
Let $\binom{n}{k}_{[2]}$ be the element (Delannoy coefficient, \seqnum{A008288}) in the $n$th row and $k$th column of the Delannoy triangle, see for instance \cite{AMROUCHE}. This triangle can be obtained by the recurrence relation
\begin{equation}
\binom{n}{k}_{[2]}=\binom{n-1}{k}_{[2]}+\binom{n-1}{k-1}_{[2]}+\binom{n-2}{k-1}_{[2]}, 
\end{equation}
where $\binom{n}{0}_{[2]}=\binom{n}{n}_{[2]}=1.$ We use the convention
$\binom{n}{k}_{[2]}= 0$ for $k$ $\notin\{0,\ldots,n\}.$

The Delannoy triangle is the triangular presentation of the classical Delannoy square array: writing $D(a,b)$ for the number of lattice paths from $(0,0)$ to $(a,b)$ using only the steps $(1,0)$, $(0,1)$ and $(1,1)$ (see \cite{Latticechains}), one has
\begin{equation}\label{Dab}
\binom{n}{k}_{[2]}=D(k,\,n-k).
\end{equation}
In particular, $\binom{2n}{n}_{[2]}=D(n,n)=D_n$ is the $n$th central Delannoy number (\seqnum{A001850}).

Moreover, Barry \cite{BARRY} has proved that the coefficients of the Delannoy triangle satisfy the following two identities
\begin{equation}\label{I1}
\binom{n}{k}_{[2]}=\underset{j=0}{\overset{k}{\sum}}\binom{k}{j}\binom{n-j}{k}
\end{equation}

and
\begin{equation}\label{I2}
\binom{n}{k}_{[2]}=\underset{j=0}{\overset{k}{\sum}}\binom{k}{j}\binom{n-k}{j}2^j.    
\end{equation}

Many great mathematicians have explored the congruence properties of binomial coefficients since early times. Let $p$ be an odd prime number.

In 1876, Hermite (see \cite{granville}) showed that {for odd $n$, the following congruence holds:}
\begin{equation}
\sum_{\substack{1\leq m\leq n \\ m \equiv 0 \text{ (mod $p-1$) }}} \binom{n}{m} \equiv 0 \pmod{p}. 
\end{equation}

Later, Glaisher (see \cite{granville}) generalized it: for every given prime $p$ and integers $1\leq j, k \leq p-1$, established for $n \equiv k$ (mod ${p-1}$),
\begin{equation}
\sum_{\substack{1\leq m\leq n \\ m \equiv j \text{ (mod $p-1$) }}} \binom{n}{m} \equiv \binom{k}{j} \pmod p.
\end{equation}

In 1862, Wolstenholme \cite{wol} established the well-known congruence for binomial coefficients, namely for all prime $p\geq 5,$
\begin{equation}\label{wolstenholme}
\binom{2p-1}{p-1}  = \frac{1}{2} \binom{2p}{p} \equiv 1 \pmod{p^3}.
\end{equation}

In 1895, Morley \cite{morley} obtained that
\begin{equation}
\binom{p-1}{(p-1) / 2} \equiv(-1)^{(p-1) / 2} 4^{p-1} \pmod{p^3},
\end{equation}
for any prime number $p \geq 5.$
Later, in 1900, Glaisher \cite{glaisher} proved that
\begin{equation}\label{gly}
\binom{n p-1}{p-1} \equiv 1-p^3 \frac{n(n-1)}{3} B_{p-3} \pmod{p^4},
\end{equation}
where $n \geq 1$ is an integer, and $B_n$ is the $n$--th Bernoulli number.

Recall that the bi$^2$nomial coefficients (see \cite{connection,bel14}) are those coefficients denoted by $\binom{n}{k}_2$, and defined by:
\[
\bigl(1+x+x^2\bigr)^n=\sum_{j=0}^{2n} \binom{n}{j}_2 x^j.
\]

The exploration of congruence properties associated with bi$^2$nomial coefficients is currently expanding. Apagodu and Liu \cite{apagodu} established for all prime $p\geq 5$ that
\begin{equation} \label{A}
\sum_{n=0}^{p-1} \sum_{k=0}^{p-1} \binom{n}{k}_2 \equiv \frac{1}{2}\biggl((-1)^{\frac{p-1}{2}}+1\biggr) \pmod p
\end{equation}

and 
\begin{equation}\label{B}
\binom{2p}{p}_2 \equiv 2+\frac{2p^2}{3}\biggl(  \frac
{p}{3}\biggr) B_{p-2} \biggl(\frac{1}{3}\biggr) \pmod{p^3},
\end{equation}
where $B_m(t)$ is the Bernoulli polynomial of order $m$, see for instance \cite{bernoulli}.

Elkhiri and Mihoubi \cite{elkhiri} showed that
\begin{equation}\label{laid}
\binom{np - 1}{p - 1}_2 \equiv 
\begin{cases}
1 + np q_p(3) \pmod{p^2}, & \text{if } p \equiv 1 \pmod{3}, \\
-1 - np q_p(3) \pmod{p^2}, & \text{if } p \equiv 2 \pmod{3},
\end{cases}
\end{equation}
and
\begin{equation}
\binom{np - 1}{(p - 1)/2}_2 \equiv 
\begin{cases}
1 + np \bigl( 2 q_p(2) + \frac{1}{2} q_p(3) \bigr) \pmod{p^2}, & \text{if } p \equiv 1 \pmod{6}, \\
-\frac{1}{2} pn q_p(3) \pmod{p^2}, & \text{if } p \equiv 5 \pmod{6},
\end{cases}
\end{equation}
where $ q_p(x) := \dfrac{x^{p-1} - 1}{p} $ is called the Fermat quotient and $ x $ is coprime with $ p.$

Other congruences involving the bi$^s$nomial coefficients can be found in the work of Belbachir and Otmani \cite{otmaniquad,otmani}, where the authors establish results analogous to Wolstenholme's congruence, as well as those of Morley and Glaisher.

Arithmetic properties of Delannoy numbers themselves have also received considerable attention. Guo and Zeng \cite{guozeng} obtained congruences for sums involving central Delannoy numbers, and Sun \cite{sun11,SUN2014,sun2018} established numerous congruences and supercongruences for central Delannoy numbers, Delannoy polynomials and generalized central trinomial coefficients. In contrast with these works, which mainly concern the central column $D_n=\binom{2n}{n}_{[2]}$ of the triangle, the results of the present paper deal with the entries $\binom{n}{k}_{[2]}=D(k,n-k)$ of the whole Delannoy triangle.

Our aim is to prove some congruences involving the Delannoy triangle coefficients. Motivated by the previous results, we begin by establishing congruences similar to Wolstenholme's congruence, followed by proving a double sum congruence similar to the identity of Apagodu and Liu \eqref{A}.
\section{Wolstenholme-type congruences for Delannoy triangle coefficients}
The first result consists of the following two congruences, which are similar to Wolstenholme's theorem.
\begin{theorem}\label{thm1}
For all prime $p\geq 5$, we have 
\begin{equation} \label{Eq}
\binom{2p}{p}_{[2]} \equiv 3+2pq_p(2)-p^2q_p(2)^2 \pmod{p^3},
\end{equation} 
	
\begin{equation}\label{Eq2}
\binom{2p-1}{p-1}_{[2]} \equiv 1+2pq_p(2)-p^2q_p(2)^2 \pmod{p^3},
\end{equation}
where $q_p(2)= \bigl(2^{p-1} - 1\bigr)/p $ is the Fermat quotient.
\end{theorem}
\begin{remark}
By \eqref{Dab}, we have $\binom{2p}{p}_{[2]}=D_p$, so that congruence \eqref{Eq} determines the central Delannoy number $D_p$ modulo $p^3$; in particular, it refines the immediate consequence $D_p\equiv 3$ (mod $p$). The known arithmetic results of Sun on Delannoy numbers \cite{sun11,SUN2014,sun2018} concern sums of products $\sum_{k=0}^{p-1}D_k(x)s_{k+1}(x)$ and sums such as $\sum_{k=1}^{p-1}D_k/k^2$, rather than an individual coefficient $D_p$; to the best of our knowledge, the explicit residues modulo $p^3$ given in Theorems \ref{thm1} and \ref{thm3}, expressed in terms of the Fermat quotient $q_p(2)$, do not appear in the literature. The proofs, however, rely on the known congruences for harmonic-type sums recalled in Lemmas \ref{lm2} and \ref{lm3}, so that the novelty lies in the resulting formulas rather than in the method.
\end{remark}
\begin{remark}
Congruence \eqref{Eq} fails for $p=3$: indeed, $\binom{6}{3}_{[2]}=D_3=63\equiv 9$ (mod $27$), while the right-hand side of \eqref{Eq} equals $3+6-9\equiv 0 $ (mod $27$), since $q_3(2)=1$. On the other hand, congruence \eqref{Eq2} does hold for $p=3$, as $\binom{5}{2}_{[2]}=25\equiv 1+6-9$ (mod $27$), but our proof requires $p\geq 5$.
\end{remark}

This second congruence is inspired by the Glaisher congruence \eqref{gly} and \eqref{laid}.
\begin{theorem}\label{thm3}
Let $p \geq 5$ be a prime and $n$ a positive integer. Then
\begin{equation}{\label{Eq3}}
\binom{np-1}{p-1}_{[2]} \equiv 1+(n-1)pq_p(2)\bigl(2-pq_p(2)\bigr) \pmod{p^3},
\end{equation}
where $q_p(2)$ is the Fermat quotient.
\end{theorem}

For the proofs we need some results.
\begin{lemma}\label{lm1}
Let $s$ be an integer and let $p$ be an odd prime. Then, for each $k = 1, 2, \ldots , p - 1$,
\begin{equation}\label{bino}
\binom{sp-1}{k} \equiv (-1)^k \bigl(1-spH_k+\frac{s^2p^2}{2}\bigl(H_k^2-H_{k,2}\bigr)\bigr) \pmod{p^3},  
\end{equation}
where 
\[
H_n := \sum_{1\leq k \leq n} \frac{1}{k} \textrm{ } \textrm{ and } H_{n,2} := \sum_{1\leq k \leq n} \frac{1}{k^2} \textrm{ } \textrm{ for } n \in \mathbb{N}^*,\text{ with } H_0=H_{0,2}=0,
\]
are the harmonic numbers (of order one and two, respectively). 
\end{lemma}
\begin{proof}
For a fixed $1 \leq k \leq p-1$ we have
\[
(-1)^k \binom{sp-1}{k} = \prod_{i=1}^k \biggl(1 - \frac{sp}{i}\biggr) \equiv 1 - \sum_{i=1}^k \frac{sp}{i} + \sum_{1 \leq i < j \leq k} \frac{s^2p^2}{ij} \pmod{p^3}
\]
\[
= 1 - spH_k + \frac{s^2p^2}{2} \biggl( \biggl(\sum_{i=1}^k \frac{1}{i}\biggr)^2 - \sum_{i=1}^k \frac{1}{i^2} \biggr)
\]
\[
= 1 - spH_k + \frac{s^2p^2}{2} \bigl( H_k^2 - H_{k,2} \bigr) \pmod{p^3},
\]
whence, we have \eqref{bino}.
\end{proof}

\begin{lemma}\label{lm2}\cite[Theorem\ 4.1]{sun08}.
If $p > 3$ is a prime, then
\begin{equation} \label{31}
\sum_{k=1}^{p-1} \frac{2^k}{k} \equiv -2q_p(2) \pmod{p^2},
\end{equation}
\begin{equation}\label{32}
\sum_{k=1}^{p-1} \frac{2^k}{k^2} \equiv -q_p(2)^2 \pmod{p}.
\end{equation}
\end{lemma}
\begin{lemma} \label{lm3}\cite{mestrovic}. Let $p \geq 5$ be a prime. Then
\begin{equation}\label{33}
\sum_{k=1}^{p-1} \frac{H_k 2^k}{k} \equiv -q_p(2)^2 \pmod{p},
\end{equation}
where $H_k$ is the harmonic number.
\end{lemma}
\begin{remark}
Me\v{s}trovi\'{c}'s result \cite{mestrovic} is stated for primes $p>5$. The remaining case $p=5$ of \eqref{33} is checked directly:
\[
\sum_{k=1}^{4} \frac{H_k 2^k}{k} = 2+3+\frac{44}{9}+\frac{25}{3} \equiv 2+3+1+0 \equiv 1 \equiv -q_5(2)^2 \pmod 5,
\]
since $q_5(2)=3$.
\end{remark}

Thus, we now proceed with the proof of the first Theorem \ref{thm1}.
\begin{proof}[Proof of Theorem~\ref{thm1}]
From Lemma \ref{lm1}, we have
\[
\binom{p}{k}=\frac{p}{k}\binom{p-1}{k-1} \equiv p \frac{(-1)^{k-1}}{k} \pmod{p^2}, \text{  } k \in \{ 1,\ldots , p-1\}.
\]
Then, 
\[
\binom{p}{k}^2 \equiv  \frac{p^2}{k^2} \pmod{p^3}, \text{  } k \in \{ 1,\ldots , p-1\}.
\]
It follows from \eqref{I2} that 
\[
\binom{2p}{p}_{[2]}  = \sum_{k=0}^{p} \binom{p}{k}^2 2^k \equiv 1+ 2^p +p^2 \sum_{k=1}^{p-1} \frac{2^k}{k^2} \pmod{p^3}.
\]
Substituting \eqref{32}  (Lemma \ref{lm2}) and using the fact that $2^{p-1}=1+pq_p(2)$, we get \eqref{Eq}.
	
Also from \eqref{I2}, we have $\binom{2p-1}{p-1}_{[2]}= \sum_{k=0}^{p-1}\binom{p}{k} \binom{p-1}{k} 2^k $, and from Lemma \ref{lm1}, we get 
\begin{equation}
\binom{p}{k} \binom{p-1}{k} \equiv -\frac{p}{k}+\frac{p^2}{k}\bigl(H_k+H_{k-1}\bigr) \pmod{p^3},
\end{equation}
whence taking $H_{k-1} = H_k - \frac{1}{k}$ and inserting the congruences \eqref{31}--\eqref{32} and \eqref{33} from Lemmas \ref{lm2} and \ref{lm3}, we obtain \eqref{Eq2}.
\end{proof}
Now, we prove the second Theorem \ref{thm3}.
\begin{proof}[Proof of Theorem~\ref{thm3}]
We have from the explicit formula \eqref{I2}{, using the absorption identity $\binom{p(n-1)}{j}=\frac{(n-1)p}{j}\binom{p(n-1)-1}{j-1}$ for $j\geq 1$ and separating the term $j=0$,}
\begin{align*}
\binom{np-1}{p-1}_{[2]}	&= \sum _{j=0}^{p-1} \binom{p-1}{j}\binom{p(n-1)}{j}2^j \\
&{=1+(n-1)p\sum _{j=1}^{p-1} \binom{p-1}{j}\binom{p(n-1)-1}{j-1}\frac{2^j}{j}.}
\end{align*}
Then from Lemma \ref{lm1} we obtain
\begin{align*}
\binom{np-1}{p-1}_{[2]}& \equiv 1+(n-1)p\sum _{j=1}^{p-1} \bigg(-1+(n-1)pH_{j-1}+pH_j\bigg)\frac{2^j}{j} \pmod{p^3}\\
& = 1-(n-1)p\sum_{j=1}^{p-1}\frac{2^j}{j}+(n-1)^2p^2\sum_{j=1}^{p-1}\frac{H_{j-1}2^j}{j}+(n-1)p^2\sum_{j=1}^{p-1}\frac{H_{j}2^j}{j}.
\end{align*}
Combining Lemma \ref{lm3} and Lemma \ref{lm2} with $H_{j-1}=H_j-\frac{1}{j}${, which gives in particular $\sum_{j=1}^{p-1}\frac{H_{j-1}2^j}{j}\equiv 0$ (mod $p$)}, we arrive at the desired result.
\end{proof}
\section{Congruence on double sum of Delannoy coefficients}
Our next result is motivated by the congruence \eqref{A} in the following theorem:
\begin{theorem}\label{T1}
Let $p$ be an odd prime. Then
\begin{equation}
\underset{0\leq k\leq n\leq p-1}{\sum}\binom{n}{k}_{[2]}\equiv\biggl(\frac{2}{p}\biggr) \pmod p, 
\end{equation}
where $\bigl(\frac{\cdot}{p}\bigr)$ is the Legendre symbol.
\end{theorem}
\begin{remark}\label{pellremark}
As kindly pointed out by the anonymous referee, Theorem \ref{T1} admits an alternative short proof via Pell numbers. Indeed, the row sums of the Delannoy triangle are the Pell numbers,
\[
\sum_{k=0}^{n}\binom{n}{k}_{[2]}=P_{n+1}, \qquad \text{where } P_0=0,\ P_1=1 \text{ and } P_{r+1}=2P_r+P_{r-1},
\]
see Mu and Zheng \cite{muzheng} (for the Pell sequence, see Bicknell \cite{bicknell}). Hence
\[
\underset{0\leq k\leq n\leq p-1}{\sum}\binom{n}{k}_{[2]}=\sum_{r=1}^{p}P_r=\frac{P_p+P_{p+1}-1}{2},
\]
and the classical Lucas-sequence congruences $P_p\equiv\bigl(\frac{2}{p}\bigr)$ and $P_{p+1}\equiv 1+\bigl(\frac{2}{p}\bigr)$ (mod $p$) yield the result at once. The proof given below, based on generalized central trinomial coefficients, is of a different nature and may be of independent interest.
\end{remark}

To establish this theorem, we require specific definitions and lemmas.

The central Delannoy numbers (see \cite{Latticechains}) (\seqnum{A001850}, OEIS \cite{oeis}) are defined by
\[
D_n=\sum_{k=0}^n\binom{n}{k}\binom{n+k}{k}=\sum_{k=0}^n\binom{n+k}{2 k}\binom{2 k}{k}, \quad n \in \mathbb{N}.
\]

More generally, the Delannoy polynomials (see \cite{sun11}) are defined by
\[
D_n(x)=\sum_{k=0}^n\binom{n}{k}\binom{n+k}{k}x^k, \quad n \in \mathbb{N},
\]
so that $D_n=D_n(1)$. They satisfy $D_n(x)=P_n(2x+1)$, where $P_n$ denotes the $n$th Legendre polynomial, see \cite{sun11}.

Given $b, c \in \mathbb{Z}$, Sun, \cite{SUN2014}, defined the generalized central trinomial coefficients by
\begin{align*}
T_n(b, c) :=\bigl[x^n\bigr]\bigl(x^2+b x+c\bigr)^n &
=\sum_{k=0}^{\lfloor n / 2\rfloor}\binom{n}{2 k}\binom{2 k}{k} b^{n-2 k} c^k\\ & =\sum_{k=0}^{\lfloor n / 2\rfloor}\binom{n-k}{k}\binom{n}{k} b^{n-2 k} c^k.
\end{align*}
In particular, $D_n(x)=T_n(2x+1,\,x^2+x)$, see \cite{SUN2014}.
\begin{lemma}\label{L1}
Let $p$ be a prime number and let $j$ and $k$ be integers with $0\leq j\leq k\leq p-2$. Then 
\begin{equation}\label{eq2}
\binom{p-j}{k+1} +\binom{k+j}{k+1}(-1)^{k} \equiv 0 \pmod p.
\end{equation}
\end{lemma}
\begin{proof}
By using the general binomial coefficient, see \cite[Equation\ 1.2, p.\ 2]{quaintance}, {and since $k+1\leq p-1$, so that $(k+1)!$ is invertible modulo $p$,} we obtain
\[
\binom{p-j}{k+1}\equiv \binom{-j}{k+1} \pmod p.
\] 
And from the binomial identity $(-1)$--transformation: 
\[
\binom{n}{k}=(-1)^k\binom{k-n-1}{k},
\]
see in \cite[Equation\ 1.6, p.\ 3]{quaintance}, then the proof of Lemma \ref{L1} is obtained. 
\end{proof}
\begin{lemma}\label{L2}
\cite[Theorem\ 1.2(i)]{SUN2014} Let $p$ be an odd prime and let $b, c \in \mathbb{Z}.$ For any integer $m \not\equiv 0$ (mod $p$), we have
\begin{equation}\label{eq1}
\underset{k=0}{\overset{p-1}{\sum}}\frac{T_{k}(b,c)}{m^k}\equiv \biggl(\frac{(m-b)^2-4c}{p}\biggr) \pmod p.
\end{equation}
\end{lemma}
\begin{lemma}\label{L3}
For every integer $k\geq 0$, we have
\begin{equation}\label{eqDelrec}
\sum_{j=0}^{k}\binom{k}{j}\binom{k+j}{k+1}=\frac{D_{k+1}-3D_{k}}{4}.
\end{equation}
\end{lemma}
\begin{proof}
For $k=0$ both sides vanish, so let $k\geq 1$. Since $\binom{k+j}{k+1}=\frac{j}{k+1}\binom{k+j}{j}$, the left-hand side of \eqref{eqDelrec} equals
\[
\frac{1}{k+1}\sum_{j=0}^{k} j\binom{k}{j}\binom{k+j}{j}=\frac{D_k'(1)}{k+1}.
\]
From $D_k(x)=P_k(2x+1)$ and the classical Legendre relation $(x^2-1)P_k'(x)=k\bigl(xP_k(x)-P_{k-1}(x)\bigr)$, see, e.g., \cite{szego}, we get
\[
D_k'(1)=2P_k'(3)=\frac{k\bigl(3D_k-D_{k-1}\bigr)}{4}.
\]
Moreover, the three-term Legendre recurrence $(k+1)P_{k+1}(x)=(2k+1)xP_k(x)-kP_{k-1}(x)$, evaluated at $x=3$, gives $(k+1)D_{k+1}=3(2k+1)D_k-kD_{k-1}$, whence
\[
k\bigl(3D_k-D_{k-1}\bigr)=(k+1)\bigl(D_{k+1}-3D_k\bigr),
\]
and the result follows. The sequence $\bigl(\frac{D_{k+1}-3D_k}{4}\bigr)_{k\geq 0}$ is \seqnum{A050151} in the OEIS \cite{oeis}.
\end{proof}

Now, we are able to proceed to the proof of Theorem \ref{T1}.
\begin{proof}[Proof of Theorem \ref{T1}]
We have from \eqref{I1}
\begin{align*}
\overset{p-1}{\underset{n=0}{\sum}}\underset{k=0}{\overset{n}{\sum}}\binom{n}{k}_{[2]}
& =\overset{p-1}{\underset{n=0}{\sum}}\underset{k=0}
{\overset{n}{\sum}}\overset{k}{\underset{j=0}{\sum}}\binom{k}{j}\binom{n-j}{k}\\
&  =\overset{p-1}{\underset{k=0}{\sum}}\underset{n=k}{\overset{p-1}{\sum}}\overset{k}{\underset{j=0}{\sum}}\binom{k}{j}\binom{n-j}{k}\\
&=\overset{p-1}{\underset{k=0}{\sum}}\underset{j=0}{\overset{p-1}{\sum}}\overset{p-1}{\underset{n=\max(j,k)}{\sum}}\binom{k}{j}\binom{n-j}{k}\\
&  =\overset{p-1}{\underset{k=0}{\sum}}\underset{j=0}{\overset{p-1}{\sum}}\binom{k}{j}\underset{n=k+j}{\overset{p-1}{\sum}}\binom{n-j}{k}\\
&=\overset{p-1}{\underset{k=0}{\sum}}\underset{j=0}{\overset{p-1}{\sum}}\binom{k}{j}\underset{n=0}{\overset{p-1-k-j}{\sum}}\binom{n+k}{k}{,}
\end{align*}
where we used the fact that $\binom{n-j}{k}=0$ for $\max(j,k)\leq n< k+j$.
	
In \cite[Identity\ (1.48)]{gould}, we have $\overset{n}{\underset{k=0}{\sum}}\binom{k+s}{r}=\binom{n+s+1}{r+1}-\binom{s}{r+1}$, for $s,r,n \in \mathbb{N}.$
Then
\begin{align*}
\overset{p-1}{\underset{n=0}{\sum}}\underset{k=0}{\overset{n}{\sum}}\binom{n}{k}_{[2]} & =\underset{k=0}{\overset{p-1}{\sum}}\overset{k}{\underset{j=0}{\sum}}\binom{p-j}{k+1}\binom{k}{j}\\
& {=\underset{k=0}{\overset{p-2}{\sum}}\overset{k}{\underset{j=0}{\sum}}\binom{p-j}{k+1}\binom{k}{j}+\underset{j=0}{\overset{p-1}{\sum}}\binom{p-j}{p}\binom{p-1}{j}.}
\end{align*}
	
In the last sum, $\binom{p-j}{p}=0$ for $1\leq j\leq p-1$, so that it reduces to its term $j=0$, namely $\binom{p}{p}\binom{p-1}{0}=1$. Applying Lemma \ref{L1} to the first sum (its indices satisfy $0\leq j\leq k\leq p-2$), and then Lemma \ref{L3}, we obtain
\begin{align*}
\overset{p-1}{\underset{n=0}{\sum}}\underset{k=0}{\overset{n}{\sum}}\binom{n}{k}_{[2]} &  \equiv 1+\overset{p-2}{\underset{k=0}{\sum}}\underset{j=0}{\overset{k}{\sum}}(-1)^{k+1}\binom{k+j}{k+1}\binom{k}{j}\pmod p\\
&  {=1+\underset{k=0}{\overset{p-2}{\sum}}(-1)^{k+1}\frac{D_{k+1}-3D_{k}}{4}.}
\end{align*}
	
We have from \cite[Remark\ 1.2]{sun11}, $D_{n}(-x-1)=(-1)^{n}D_{n}(x)$.

For $x=1,$ then $(-1)^{n}D_{n}=D_{n}(-2)$ and {since} $D_{n}(x)=T_{n}(2x+1,x^{2}+x),$ thus $D_{n}(-2)=T_{n}(-3,2).$
	
Applying Lemma \ref{L2} {with $m=1$, $b=-3$ and $c=2$, for which $(m-b)^2-4c=16-8=8$ and $\bigl(\frac{8}{p}\bigr)=\bigl(\frac{2}{p}\bigr)$,} we obtain 
\[
\overset{p-1}{\underset{k=0}{\sum}}T_{k}(-3,2)\equiv \biggl(\frac{2}
{p}\biggr)  \pmod p\text{ then } \overset{p-1}{\underset{k=0}{\sum}}(-1)^{k}D_{k}\equiv\biggl(  \frac{2}{p}\biggr)  \pmod p.
\]
	
Then, after reindexing the first sum,
\begin{align*}
\overset{p-1}{\underset{n=0}{\sum}}\underset{k=0}{\overset{n}{\sum}}\binom{n}{k}_{[2]}&  {\equiv} 1+\overset{p-2}{\underset{k=0}{\sum}}(-1)^{k+1}\frac{D_{k+1}-3D_{k}}{4} {\pmod p}\\
&  \equiv \frac{3}{4}+\biggl(\frac{2}{p}\biggr)  -\frac{3}{4}\bigl(-1\bigr)  ^{p-1}D_{p-1} \pmod p\\
&  \equiv \biggl(\frac{2}{p}\biggr)  \pmod p,
\end{align*}
since $D_{p-1}\equiv 1$ (mod $p$). Indeed, in $D_{p-1}=\sum_{j=0}^{p-1}\binom{p-1}{j}\binom{p-1+j}{j}$, every term with $j\geq 1$ is divisible by $p$, because the product $(p-1+1)\cdots(p-1+j)$ contains the factor $p$ while $j!$ is prime to $p$.
\end{proof}
\section{Acknowledgment}
The authors express their gratitude to Yassine Otmani for his valuable comments and suggestions, and thank the anonymous referee for a careful reading of the manuscript and for many valuable corrections and suggestions, in particular for pointing out the alternative proof given in Remark \ref{pellremark}.

\begin{thebibliography}{33}

\bibitem{AMROUCHE} S. Amrouche and H. Belbachir, {Unimodality and linear recurrences associated with rays in the Delannoy triangle}, {\it Turkish J. Math.} {\bf 44} (2020), 118--130.

\bibitem{apagodu} M. Apagodu and J. C. Liu, {Congruence properties for the trinomial coefficients}, {\it Integers} {\bf 20} (2020).

\bibitem{BARRY} P. Barry, {On integer-sequence-based constructions of generalized Pascal triangles}, {\it J. Integer Sequences} {\bf 9} (2006), 
\href{https://cs.uwaterloo.ca/journals/JIS/VOL9/Barry/barry91.html}{Article 06.2.4}.

\bibitem{bel14} H. Belbachir and A. Benmezai, {A $q$--analogue for binomial coefficients and generalized Fibonacci sequences}, {\it C. R. Math. Acad. Sci. Paris} {\bf 352} (2014), 167--171.

\bibitem{connection} H. Belbachir, S. Bouroubi, and A. Khelladi, {Connection between ordinary multinomials, Fibonacci numbers, Bell polynomials and discrete uniform distribution}, {\it Ann. Math. Inform.} {\bf 35} (2008), 21--30.

\bibitem{bernoulli} H. Belbachir, S. Hadj--Brahim, Y. Otmani, and M. Rachidi, {Some combinatorial identities of the degenerate Bernoulli and Euler--Genocchi polynomials}, {\it Indian J. Pure Appl. Math.} {\bf 53} (2022), 425--442.

\bibitem{otmaniquad} H. Belbachir and Y. Otmani, {Quadrinomial--like versions for Wolstenholme, Morley and Glaisher congruences}, {\it Integers} {\bf 23} (2023), \#A76.

\bibitem{otmani} H. Belbachir and Y. Otmani, {Supercongruences concerning bisnomial coefficients}, {\it Rocky Mountain J. Math.} {\bf 54} (2024), 943--953.

\bibitem{bicknell} M. Bicknell, {A primer on the Pell sequence and related sequences}, {\it Fibonacci Quart.} {\bf 13} (1975), 345--349.

\bibitem{Latticechains} J. S. Caughman, C. R. Haithcock, and J. J. P. Veerman, {A note on lattice chains and Delannoy numbers}, {\it Discrete Math.} {\bf 308} (2008), 2623--2628.

\bibitem{elkhiri} L. Elkhiri and M. Mihoubi, {Elementary proof of congruences involving trinomial coefficients for Babbage and Morley}, {\it Online J. Anal. Comb.} {\bf 18} (2023).

\bibitem{glaisher} J. W. L. Glaisher, {Congruences relating to the sums of products of the first $n$ numbers and to other sums of products}, {\it Quart. J. Pure Appl. Math.} {\bf 31} (1900), 1--35.

\bibitem{gould} H. W. Gould, {\it Combinatorial Identities: A Standardized Set of Tables Listing 500 Binomial Coefficient Summations}, Morgantown, W. Va., 1972.

\bibitem{granville} A. Granville, {\it Arithmetic properties of binomial coefficients. I. Binomial coefficients modulo prime powers}, in Organic Mathematics (Burnaby, BC, 1995), CMS Conf. Proc., Vol. 20, Amer. Math. Soc., 1997, pp. 253--276.

\bibitem{guozeng} V. J. W. Guo and J. Zeng, {New congruences for sums involving Ap\'ery numbers or central Delannoy numbers}, {\it Int. J. Number Theory} {\bf 8} (2012), 2003--2016.

\bibitem{mestrovic} R. Me\v{s}trovi\'{c}, {On the mod $p^2$ determination of $\sum_{k=1}^{p-1}H_k/(k\cdot 2^k)$: another proof of a conjecture by Sun}, {\it Publ. Math. Debrecen} {\bf 82} (2013), 107--123.

\bibitem{morley} F. Morley, {Note on the congruence $2^{4 n} \equiv(-1)^n(2 n)!/(n!)^2$, where $2 n+1$ is a prime}, {\it Ann. of Math.} {\bf 9} (1895), 168--170.

\bibitem{muzheng} L. Mu and S.-N. Zheng,{On the total positivity of Delannoy-like triangles}, {\it J. Integer Sequences} {\bf 20} (2017), 
\href{https://cs.uwaterloo.ca/journals/JIS/VOL20/Zheng/zheng8.html}{Article 17.1.6}.

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

\bibitem{quaintance} J. Quaintance and H. W. Gould, {\it Combinatorial Identities for Stirling Numbers: The Unpublished Notes of H. W. Gould}, World Scientific, 2015.

\bibitem{sun08} Z.-H. Sun, {Congruences involving Bernoulli and Euler numbers}, {\it J. Number Theory} {\bf 128} (2008), 280--312.

\bibitem{sun11} Z.-W. Sun, {On Delannoy numbers and Schr{\"o}der numbers}, {\it J. Number Theory} {\bf 131} (2011), 2387--2397.

\bibitem{SUN2014} Z.-W. Sun, {Congruences involving generalized central trinomial coefficients}, {\it Sci. China Math.} {\bf 57} (2014), 1375--1400.

\bibitem{sun2018} Z.-W. Sun, {Arithmetic properties of Delannoy numbers and Schr\"oder numbers}, {\it J. Number Theory} {\bf 183} (2018), 146--171.

\bibitem{szego} G. Szeg\H{o}, {\it Orthogonal Polynomials}, 4th edition, in American Mathematical Society Colloquium Publications, 1975.

\bibitem{wol} J. Wolstenholme,{On certain properties of prime numbers},  {\it Quart. J. Pure Appl. Math.} {\bf 5} (1862), 35--39.

\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2020 {\it Mathematics Subject Classification}:
Primary 11A07;  Secondary 05A10, 11B65.

\noindent \emph{Keywords:} Delannoy triangle coefficient, Wolstenholme's theorem, congruence.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A001850},
\seqnum{A008288},
\seqnum{A027907}, and
\seqnum{A050151}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received  April 23 2025;
revised versions received  April 24 2025; August 18 2026; August 25 2026.
Published in {\it Journal of Integer Sequences}, September 21 2026.

\bigskip
\hrule
\bigskip

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


\end{document}
