Delannoy Number

DOWNLOAD Mathematica Notebook

The Delannoy numbers D(a,b) are the number of lattice paths from (0,0) to (b,a) in which only east (1, 0), north (0, 1), and northeast (1, 1) steps are allowed (i.e., ->, ^, and ->). They are given by the recurrence relation

 D(a,b)=D(a-1,b)+D(a,b-1)+D(a-1,b-1),
(1)

with D(0,0)=1. The are also given by the sums

D(n,k)=sum_(d=0)^(n)(k; d)(n+k-d; k)
(2)
=sum_(d=0)^(n)2^d(k; d)(n; d)
(3)
=(n+k; k)_2F_1(-n,-k;-(k+n);-1),
(4)

where _2F_1(a,b;c;z) is a hypergeometric function.

A table for values for the Delannoy numbers is given by

 1 1 1 1 1 1 1 1 1 ...; 1 3 5 7 9 11 13 15 17 ...; 1 5 13 25 41 61 85 113 145 ...; 1 7 25 63 129 231 377 575 833 ...; 1 9 41 129 321 681 1289 2241 3649 ...; 1 11 61 231 681 1683 3653 7183 13073 ...
(5)

(OEIS A008288) for m=0, 1, ... increasing from left to right and n=0, 1, ... increasing from top to bottom.

They have the generating function

 sum_(p,q=1)^inftyD(p,q)x^py^q=(1-x-y-xy)^(-1)
(6)

(Comtet 1974, p. 81).

DelannoyNumber

Taking n=a=b gives the central Delannoy numbers D(n,n), which are the number of "king walks" from the (0,0) corner of an n×n square to the upper right corner (n,n). These are given by

 D(n,n)=P_n(3),
(7)

where P_n(x) is a Legendre polynomial (Moser 1955; Comtet 1974, p. 81; Vardi 1991). Another expression is

D(n)=D(n,n)
(8)
=sum_(k=0)^(n)(n; k)(n+k; k)
(9)
=_2F_1(-n,n+1;1,-1),
(10)

where (a; b) is a binomial coefficient and _2F_1(a,b;c;z) is a hypergeometric function. These numbers have a surprising connection with the Cantor set (E. W. Weisstein, Apr. 9, 2006).

They also satisfy the recurrence equation

 D(n)=(3(2n-1)D(n-1)-(n-1)D(n-2))/n.
(11)

They have generating function

G(x)=1/(sqrt(1-6x+x^2))
(12)
=1+3x+13x^2+63x^3+321x^4+....
(13)

The values of D(n) for n=1, 2, ... are 3, 13, 63, 321, 1683, 8989, 48639, ... (OEIS A001850). The numbers of decimal digits in D(10^n,10^n) for n=0, 1, ... are 1, 7, 76, 764, 7654, 76553, 765549, 7655510, ... (OEIS A114470), where the digits approach those of log_(10)(3+2sqrt(2))=0.765551... (OEIS A114491).

The first few prime Delannoy numbers are 3, 13, 265729, ... (OEIS A092830), corresponding to indices 1, 2, 8, ..., with no others for n<1.1×10^5 (Weisstein, Mar. 8, 2004).

The Schröder numbers bear the same relation to the Delannoy numbers as the Catalan numbers do to the binomial coefficients.

Amazingly, taking the Cholesky decomposition of the square array of D(a,b), transposing, and multiplying it by the diagonal matrix diag(2^(-0/2),2^(-1/2),2^(-2/2),...) gives the square matrix (i.e., lower triangular) version of Pascal's triangle (G. Helms, pers. comm., Aug. 29, 2005).

DelannoyNumberArrays

Beautiful fractal patterns can be obtained by plotting D(a,b) (mod m) (E. Pegg, Jr., pers. comm., Aug. 29, 2005). In particular, the m=3 case corresponds to a pattern resembling the Sierpiński carpet.

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.