cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-9 of 9 results.

A001850 Central Delannoy numbers: a(n) = Sum_{k=0..n} C(n,k)*C(n+k,k).

Original entry on oeis.org

1, 3, 13, 63, 321, 1683, 8989, 48639, 265729, 1462563, 8097453, 45046719, 251595969, 1409933619, 7923848253, 44642381823, 252055236609, 1425834724419, 8079317057869, 45849429914943, 260543813797441, 1482376214227923, 8443414161166173, 48141245001931263
Offset: 0

Views

Author

Keywords

Comments

Number of paths from (0,0) to (n,n) in an n X n grid using only steps north, northeast and east (i.e., steps (1,0), (1,1), and (0,1)).
Also the number of ways of aligning two sequences (e.g., of nucleotides or amino acids) of length n, with at most 2*n gaps (-) inserted, so that while unnecessary gappings: - -a a- - are forbidden, both b- and -b are allowed. (If only other of the latter is allowed, then the sequence A000984 gives the number of alignments.) There is an easy bijection from grid walks given by Dickau to such set of alignments (e.g., the straight diagonal corresponds to the perfect alignment with no gaps). - Antti Karttunen, Oct 10 2001
Also main diagonal of array A008288 defined by m(i,1) = m(1,j) = 1, m(i,j) = m(i-1,j-1) + m(i-1,j) + m(i,j-1). - Benoit Cloitre, May 03 2002
So, as a special case of Dmitry Zaitsev's Dec 10 2015 comment on A008288, a(n) is the number of points in Z^n that are L1 (Manhattan) distance <= n from any given point. These terms occur in the crystal ball sequences: a(n) here is the n-th term in the sequence for the n-dimensional cubic lattice. See A008288 for a list of crystal ball sequences (rows or columns of A008288). - Shel Kaphan, Dec 26 2022
a(n) is the number of n-matchings of a comb-like graph with 2*n teeth. Example: a(2) = 13 because the graph consisting of a horizontal path ABCD and the teeth Aa, Bb, Cc, Dd has 13 2-matchings: any of the six possible pairs of teeth and {Aa, BC}, {Aa, CD}, {Bb, CD}, {Cc, AB}, {Dd, AB}, {Dd, BC}, {AB, CD}. - Emeric Deutsch, Jul 02 2002
Number of ordered trees with 2*n+1 edges, having root of odd degree, nonroot nodes of outdegree at most 2 and branches of odd length. - Emeric Deutsch, Aug 02 2002
The sum of the first n coefficients of ((1 - x) / (1 - 2*x))^n is a(n-1). - Michael Somos, Sep 28 2003
Row sums of A063007 and A105870. - Paul Barry, Apr 23 2005
The Hankel transform (see A001906 for definition) of this sequence is A036442: 1, 4, 32, 512, 16384, ... . - Philippe Deléham, Jul 03 2005
Also number of paths from (0,0) to (n,0) using only steps U = (1,1), H = (1,0) and D =(1,-1), U can have 2 colors and H can have 3 colors. - N-E. Fahssi, Jan 27 2008
Equals row sums of triangle A152250 and INVERT transform of A109980: (1, 2, 8, 36, 172, 852, ...). - Gary W. Adamson, Nov 30 2008
Number of overpartitions in the n X n box (treat a walk of the type in the first comment as an overpartition, by interpreting a NE step as N, E with the part thus created being overlined). - William J. Keith, May 19 2017
Diagonal of rational functions 1/(1 - x - y - x*y), 1/(1 - x - y*z - x*y*z). - Gheorghe Coserea, Jul 03 2018
Dimensions of endomorphism algebras End(R^{(n)}) in the Delannoy category attached to the oligomorphic group of order preserving self-bijections of the real line. - Noah Snyder, Mar 22 2023
a(n) is the number of ways to tile a strip of length n with white squares, black squares, and red dominos, where we must have an equal number of white and black squares. - Greg Dresden and Leo Zhang, Jul 11 2025

Examples

			G.f. = 1 + 3*x + 13*x^2 + 63*x^3 + 321*x^4 + 1683*x^5 + 8989*x^6 + ...
		

References

  • Frits Beukers, Arithmetic properties of Picard-Fuchs equations, Séminaire de Théorie des nombres de Paris, 1982-83, Birkhäuser Boston, Inc.
  • Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 593.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 81.
  • L. Moser and W. Zayachkowski, Lattice paths with diagonal steps, Scripta Math., 26 (1961), 223-229.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Wadsworth, Vol. 2, 1999; see Example 6.3.8 and Problem 6.49.
  • D. B. West, Combinatorial Mathematics, Cambridge, 2021, p. 28.

Crossrefs

Main diagonal of A064861.
Column k=2 of A262809 and A263159.

Programs

  • Maple
    seq(add(multinomial(n+k,n-k,k,k),k=0..n),n=0..20); # Zerinvary Lajos, Oct 18 2006
    seq(orthopoly[P](n,3), n=0..100); # Robert Israel, Nov 03 2015
  • Mathematica
    f[n_] := Sum[ Binomial[n, k] Binomial[n + k, k], {k, 0, n}]; Array[f, 21, 0] (* Or *)
    a[0] = 1; a[1] = 3; a[n_] := a[n] = (3(2 n - 1)a[n - 1] - (n - 1)a[n - 2])/n; Array[a, 21, 0] (* Or *)
    CoefficientList[ Series[1/Sqrt[1 - 6x + x^2], {x, 0, 20}], x] (* Robert G. Wilson v *)
    Table[LegendreP[n, 3], {n, 0, 22}] (* Jean-François Alcover, Jul 16 2012, from first formula *)
    a[n_] := Hypergeometric2F1[-n, n+1, 1, -1]; Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Feb 26 2013 *)
    a[ n_] := With[ {m = If[n < 0, -1 - n, n]}, SeriesCoefficient[ (1 - 6 x + x^2)^(-1/2), {x, 0, m}]]; (* Michael Somos, Jun 10 2015 *)
  • Maxima
    a(n):=coeff(expand((1+3*x+2*x^2)^n),x,n);
    makelist(a(n),n,0,12); /* Emanuele Munarini, Mar 02 2011 */
    
  • PARI
    {a(n) = if( n<0, n = -1 - n); polcoeff( 1 / sqrt(1 - 6*x + x^2 + x * O(x^n)), n)}; /* Michael Somos, Sep 23 2006 */
    
  • PARI
    {a(n) = if( n<0, n = -1 - n); subst( pollegendre(n), x, 3)}; /* Michael Somos, Sep 23 2006 */
    
  • PARI
    {a(n) = if( n<0, n = -1 - n); n++; subst( Pol(((1 - x) / (1 - 2*x) + O(x^n))^n), x, 1);} /* Michael Somos, Sep 23 2006 */
    
  • PARI
    a(n)=if(n<0, 0, polcoeff((1+3*x+2*x^2)^n, n)) \\ Paul Barry, Aug 22 2007
    
  • PARI
    /* same as in A092566 but use */
    steps=[[1,0], [0,1], [1,1]]; /* Joerg Arndt, Jun 30 2011 */
    
  • PARI
    a(n)=sum(k=0,n,binomial(n,k)*binomial(n+k,k)); \\ Joerg Arndt, May 11 2013
    
  • PARI
    my(x='x+O('x^30)); Vec(1/sqrt(1 - 6*x + x^2)) \\ Altug Alkan, Oct 17 2015
    
  • Python
    # from Nick Hobson.
    def f(a, b):
        if a == 0 or b == 0:
            return 1
        return f(a, b - 1) + f(a - 1, b) + f(a - 1, b - 1)
    [f(n, n) for n in range(7)]
    
  • Python
    from gmpy2 import divexact
    A001850 = [1, 3]
    for n in range(2,10**3):
        A001850.append(divexact(A001850[-1]*(6*n-3)-(n-1)*A001850[-2],n))
    # Chai Wah Wu, Sep 01 2014
    
  • Sage
    a = lambda n: hypergeometric([-n, -n], [1], 2)
    [simplify(a(n)) for n in range(23)] # Peter Luschny, Nov 19 2014

Formula

a(n) = P_n(3), where P_n is n-th Legendre polynomial.
G.f.: 1 / sqrt(1 - 6*x + x^2).
a(n) = a(n-1) + 2*A002002(n) = Sum_{j} A063007(n, j). - Henry Bottomley, Jul 02 2001
Dominant term in asymptotic expansion is binomial(2*n, n)/2^(1/4)*((sqrt(2) + 1)/2)^(2*n + 1)*(1 + c_1/n + c_2/n^2 + ...). - Michael David Hirschhorn
a(n) = Sum_{i=0..n} (A000079(i)*A008459(n, i)) = Sum_{i=0..n} (2^i * C(n, i)^2). - Antti Karttunen, Oct 10 2001
a(n) = Sum_{k=0..n} C(n+k, n-k)*C(2*k, k). - Benoit Cloitre, Feb 13 2003
a(n) = Sum_{k=0..n} C(n, k)^2 * 2^k. - Michael Somos, Oct 08 2003
a(n - 1) = coefficient of x^n in A120588(x)^n if n>=0. - Michael Somos, Apr 11 2012
G.f. of a(n-1) = 1 / (1 - x / (1 - 2*x / (1 - 2*x / (1 - x / (1 - 2*x / (1 - x / ...)))))). - Michael Somos, May 11 2012
INVERT transform is A109980. BINOMIAL transform is A080609. BINOMIAL transform of A006139. PSUM transform is A089165. PSUMSIGN transform is A026933. First backward difference is A110170. - Michael Somos, May 11 2012
E.g.f.: exp(3*x)*BesselI(0, 2*sqrt(2)*x). - Vladeta Jovovic, Mar 21 2004
a(n) = Sum_{k=0..n} C(2*n-k, n)*C(n, k). - Paul Barry, Apr 23 2005
a(n) = Sum_{k>=n} binomial(k, n)^2/2^(k+1). - Vladeta Jovovic, Aug 25 2006
a(n) = a(-1 - n) for all n in Z. - Michael Somos, Sep 23 2006
D-finite with recurrence: a(-1) = a(0) = 1; n*a(n) = 3*(2*n-1)*a(n-1) - (n-1)*a(n-2). Eq (4) in T. D. Noe's article in JIS 9 (2006) #06.2.7.
Define general Delannoy numbers by (i,j > 0): d(i,0) = d(0,j) = 1 =: d(0,0) and d(i,j) = d(i-1,j-1) + d(i-2,j-1) + d(i-1,j). Then a(k) = Sum_{j >= 0} d(k,j)^2 + d(k-1,j)^2 = A026933(n)+A026933(n-1). This is a special case of the following formula for general Delannoy numbers: d(k,j) = Sum_{i >= 0, p=0..n} d(p, i) * d(n-p, j-i) + d(p-1, i) * d(n-p-1, j-i-1). - Peter E John, Oct 19 2006
Coefficient of x^n in (1 + 3*x + 2*x^2)^n. - N-E. Fahssi, Jan 11 2008
a(n) = A008288(A046092(n)). - Philippe Deléham, Apr 08 2009
G.f.: 1/(1 - x - 2*x/(1 - x - x/(1 - x - x/(1 - x - x/(1 - ... (continued fraction). - Paul Barry, May 28 2009
G.f.: d/dx log(1/(1 - x*A001003(x))). - Vladimir Kruchinin, Apr 19 2011
G.f.: 1/(2*Q(0) + x - 1) where Q(k) = 1 + k*(1-x) - x - x*(k + 1)*(k + 2)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Mar 14 2013
a(n) = Sum_{k=0..n} C(n,k) * C(n+k,k). - Joerg Arndt, May 11 2013
G.f.: G(0), where G(k) = 1 + x*(6 - x)*(4*k + 1)/(4*k + 2 - 2*x*(6-x)*(2*k + 1)*(4*k + 3)/(x*(6 - x)*(4*k + 3) + 4*(k + 1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 22 2013
G.f.: 2/G(0), where G(k) = 1 + 1/(1 - x*(6 - x)*(2*k - 1)/(x*(6 - x)*(2*k - 1) + 2*(k + 1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 16 2013
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(6 - x)*(2*k + 1)/(x*(6 - x)*(2*k + 1) + 2*(k + 1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jul 17 2013
a(n)^2 = Sum_{k=0..n} 2^k * C(2*k, k)^2 * C(n+k, n-k) = A243949(n). - Paul D. Hanna, Aug 17 2014
a(n) = hypergeom([-n, -n], [1], 2). - Peter Luschny, Nov 19 2014
a(n) = Sum_{k=0..n/2} C(n-k,k) * 3^(n-2*k) * 2^k * C(n,k). - Vladimir Kruchinin, Jun 29 2015
a(n) = A049600(n, n-1).
a(n) = Sum_{0 <= j, k <= n} (-1)^(n+j)*C(n,k)*C(n,j)*C(n+k,k)*C(n+k+j,k+j). Cf. A126086 and A274668. - Peter Bala, Jan 15 2020
a(n) ~ c * (3 + 2*sqrt(2))^n / sqrt(n), where c = 1/sqrt(4*Pi*(3*sqrt(2)-4)) = 0.572681... (Banderier and Schwer, 2005). - Amiram Eldar, Jun 07 2020
a(n+1) = 3*a(n) + 2*Sum_{l=1..n} A006318(l)*a(n-l). [Eq. (1.16) in Qi-Shi-Guo (2016)]
a(n) ~ (1 + sqrt(2))^(2*n+1) / (2^(5/4) * sqrt(Pi*n)). - Vaclav Kotesovec, Jan 09 2023
a(n-1) + a(n) = A241023(n) for n >= 1. - Peter Bala, Sep 18 2024
a(n) = Sum_{k=0..n} C(n+k, 2*k) * C(2*k, k). - Greg Dresden and Leo Zhang, Jul 11 2025

Extensions

New name and reference Sep 15 1995
Formula and more references from Don Knuth, May 15 1996

A084773 Coefficients of 1/sqrt(1-12*x+4*x^2); also, a(n) is the central coefficient of (1+6*x+8*x^2)^n.

Original entry on oeis.org

1, 6, 52, 504, 5136, 53856, 575296, 6225792, 68026624, 748832256, 8291791872, 92255680512, 1030537089024, 11550176206848, 129824329777152, 1462841567576064, 16518691986407424, 186887008999047168, 2117944490818011136, 24038305911245635584, 273199990096465494016
Offset: 0

Views

Author

Paul D. Hanna, Jun 10 2003

Keywords

Comments

Number of Delannoy paths from (0,0) to (n,n) with steps U(0,1), H(1,0) and D(1,1) where H and D can choose from two colors each (or where one step is monochrome and the other two are bicolored). - Paul Barry, May 30 2005
2^n*P_n(3), where P_n is the n-th Legendre polynomial. 2^n*LegendreP(n,k) yields the central coefficients of (1 + 2*k*x + (k^2-1)*x^2)^n, with g.f. 1/sqrt(1 -4*k*x +4*x^2) and e.g.f. exp(2*k*x)*BesselI(0, 2*sqrt(k^2-1)*x). - Paul Barry, May 30 2005
Diagonal of rational functions 1/(1 - x - 2*y - 2*x*y), 1/(1 - x - 2*y*z - 2*x*y*z), 1/(1 - 2*x - y*z - 2*x*y*z). - Gheorghe Coserea, Jul 07 2018

Examples

			G.f.: 1/sqrt(1-2*b*x+(b^2-4*c)*x^2) yields central coefficients of (1+b*x+c*x^2)^n.
		

Crossrefs

Sequences of the form 2^n*LegendreP(n, 2*m+1): A000079 (m=0), this sequence (m=1), A098270 (m=2).
See A152254 for another interpretation.

Programs

  • Magma
    [2^n*Evaluate(LegendrePolynomial(n), 3): n in [0..40]]; // G. C. Greubel, May 21 2023
    
  • Maple
    a := n -> 2^n*hypergeom([-n, -n], [1], 2):
    seq(simplify(a(n)), n=0..20); # Peter Luschny, May 20 2015
  • Mathematica
    CoefficientList[Series[1/Sqrt[(1-12x+4x^2)],{x,0,20}],x] (* Harvey P. Dale, Dec 13 2017 *)
    Table[2^n*LegendreP[n,3], {n,0,40}] (* G. C. Greubel, May 21 2023 *)
  • PARI
    for(n=0,30,t=polcoeff((1+6*x+8*x^2)^n,n,x); print1(t","))
    
  • SageMath
    [2^n*gen_legendre_P(n,0,3) for n in range(41)] # G. C. Greubel, May 21 2023

Formula

a(n) = 2*A052141(n) = 2^n * A001850(n), n>0.
From Paul Barry, May 30 2005: (Start)
E.g.f.: exp(6*x)*Bessel_I(0, 2*sqrt(8)*x).
a(n) = Sum_{k=0..floor(n/2)} C(n, k)*C(2(n-k), n)*(-1)^k*3^(n-2*k). (End)
D-finite with recurrence: n*a(n) + 6*(-2*n+1)*a(n-1) + 4*(n-1)*a(n-2) = 0. - R. J. Mathar, Nov 30 2012
G.f.: G(0)/2, where G(k) = 1 + 1/( 1 - x*(6-2*x)*(2*k+1)/(x*(6-2*x)*(2*k+1) + (k+1)/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 17 2013
a(n) = 2^n*hyper2F1(-n, -n, 1, 2). - Peter Luschny, May 20 2015
a(n) = A059474(n,n). - Alois P. Heinz, Oct 05 2017
a(n) ~ 2^(n - 5/4) * (1 + sqrt(2))^(2*n + 1) / sqrt(Pi*n). - Vaclav Kotesovec, Jul 11 2018

A059576 Summatory Pascal triangle T(n,k) (0 <= k <= n) read by rows. Top entry is 1. Each entry is the sum of the parallelogram above it.

Original entry on oeis.org

1, 1, 1, 2, 3, 2, 4, 8, 8, 4, 8, 20, 26, 20, 8, 16, 48, 76, 76, 48, 16, 32, 112, 208, 252, 208, 112, 32, 64, 256, 544, 768, 768, 544, 256, 64, 128, 576, 1376, 2208, 2568, 2208, 1376, 576, 128, 256, 1280, 3392, 6080, 8016, 8016, 6080, 3392, 1280, 256
Offset: 0

Views

Author

Floor van Lamoen, Jan 23 2001

Keywords

Comments

We may also relabel the entries as U(0,0), U(1,0), U(0,1), U(2,0), U(1,1), U(0,2), U(3,0), ... [That is, T(n,k) = U(n-k, k) for 0 <= k <= n and U(m,s) = T(m+s, s) for m,s >= 0.]
From Petros Hadjicostas, Jul 16 2020: (Start)
We explain the parallelogram definition of T(n,k).
T(0,0) *
|\
| \
| * T(k,k)
T(n-k,0) * |
\ |
\|
* T(n,k)
The definition implies that T(n,k) is the sum of all T(i,j) such that (i,j) has integer coordinates over the set
{(i,j): a(1,0) + b(1,1), 0 <= a <= n-k, 0 <= b <= k} - {(n,k)}.
The parallelogram can sometimes be degenerate; e.g., when k = 0 or n = k. (End)
T(n,k) is the number of 2-compositions of n having sum of the entries of the first row equal to k (0 <= k <= n). A 2-composition of n is a nonnegative matrix with two rows, such that each column has at least one nonzero entry and whose entries sum up to n. - Emeric Deutsch, Oct 12 2010
From Michel Marcus and Petros Hadjicostas, Jul 16 2020: (Start)
Robeva and Sun (2020) let A(m,n) = U(m-1, n-1) be the number of subdivisions of a 2-row grid with m points on the top and n points at the bottom (and such that the lower left point is the origin).
The authors proved that A(m,n) = 2*(A(m,n-1) + A(m-1,n) - A(m-1,n-1)) for m, n >= 2 (with (m,n) <> (2,2)), which is equivalent to a similar recurrence for U(n,k) given in the Formula section below. (They did not explicitly specify the value of A(1,1) = U(0,0) because they did not care about the number of subdivisions of a degenerate polygon with only one side.)
They also proved that, for (m,n) <> (1,1), A(m,n) = (2^(m-2)/(n-1)!) * Q_n(m) =
= (2^(m-2)/(n-1)!) * Sum_{k=1..n} A336244(n,k) * m^(n-k), where Q_n(m) is a polynomial in m of degree n-1. (End)
With the square array notation of Petros Hadjicostas, Jul 16 2020 below, U(i,j) is the number of lattice paths from (0,0) to (i,j) whose steps move north or east or have positive slope. For example, representing a path by its successive lattice points rather than its steps, U(1,2) = 8 counts {(0,0),(1,2)}, {(0,0),(0,1),(1,2)}, {(0,0),(0,2),(1,2)}, {(0,0),(1,0),(1,2)}, {(0,0),(1,1),(1,2)}, {(0,0),(0,1),(0,2),(1,2)}, {(0,0),(0,1),(1,1),(1,2)}, {(0,0),(1,0),(1,1),(1,2)}. If north (vertical) steps are excluded, the resulting paths are counted by A049600. - David Callan, Nov 25 2021

Examples

			Triangle T(n,k) (with rows n >= 0 and columns k = 0..n) begins
[0]   1;
[1]   1,   1;
[2]   2,   3,   2;
[3]   4,   8,   8,   4;
[4]   8,  20,  26,  20,   8;
[5]  16,  48,  76,  76,  48,  16;
[6]  32, 112, 208, 252, 208, 112, 32;
  ...
T(5,2) = 76 is the sum of the elements above it in the parallelogram bordered by T(0,0), T(5-2,0) = T(3,0), T(2,2) and T(5,2). We of course exclude T(5,2) from the summation. Thus
T(5,2) = Sum_{a=0..5-2, b=0..2, (a,b) <> (5-2,2)} T(a(1,0) + b(1,1)) =
= (1 + 1 + 2) + (1 + 3 + 8) + (2 + 8 + 26) + (4 + 20) = 76. [Edited by _Petros Hadjicostas_, Jul 16 2020]
From _Petros Hadjicostas_, Jul 16 2020: (Start)
Square array U(n,k) (with rows n >= 0 and columns k >= 0) begins
   1,   1,   2,    4,    8, ...
   1,   3,   8,   20,   48, ...
   2,   8,  26,   76,  208, ...
   4,  20,  76,  252,  768, ...
   8,  48, 208,  768, 2568, ...
  16, 112, 544, 2208, 8016, ...
  ...
Consider the following 2-row grid with n = 3 points at the top and k = 2 points at the bottom:
   A  B  C
   *--*--*
   |    /
   |   /
   *--*
   D  E
The sets of the dividing internal lines of the A(3,2) = U(3-1, 2-1) = 8 subdivisions of the above 2-row grid are as follows: { }, {DC}, {DB}, {EB}, {EA}, {DB, DC}, {DB, EB}, and {EA, EB}. See Robeva and Sun (2020).
These are the 2-compositions of n = 3 with sum of first row entries equal to k = 1:
[1; 2], [0,1; 2,0], [0,1; 1,1], [1,0; 0,2], [1,0; 1,1], [0,0,1; 1,1,0], [0,1,0; 1,0,1], and [1,0,0; 0,1,1]. We have T(3,2) = 8 such matrices. See _Emeric Deutsch_'s contribution above. See also Section 2 in Castiglione et al. (2007). (End)
		

Crossrefs

Programs

  • Haskell
    a059576 n k = a059576_tabl !! n !! k
    a059576_row n = a059576_tabl !! n
    a059576_tabl = [1] : map fst (iterate f ([1,1], [2,3,2])) where
       f (us, vs) = (vs, map (* 2) ws) where
         ws = zipWith (-) (zipWith (+) ([0] ++ vs) (vs ++ [0]))
                          ([0] ++ us ++ [0])
    -- Reinhard Zumkeller, Dec 03 2012
    
  • Magma
    A011782:= func< n | n eq 0 select 1 else 2^(n-1) >;
    function T(n,k) // T = A059576
      if k eq 0 or k eq n then return A011782(n);
      else return 2*T(n-1, k-1) + 2*T(n-1, k) - (2 - 0^(n-2))*T(n-2, k-1);
      end if; return T;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Sep 02 2022
    
  • Maple
    A059576 := proc(n,k) local b,t1; t1 := min(n+k-2,n,k); add( (-1)^b * 2^(n+k-b-2) * (n+k-b-2)! * (1/(b! * (n-b)! * (k-b)!)) * (-2 * n-2 * k+2 * k^2+b^2-3 * k * b+2 * n^2+5 * n * k-3 * n * b), b=0..t1); end;
    T := proc (n, k) if k <= n then add((-1)^j*2^(n-j-1)*binomial(k, j)*binomial(n-j, k), j = 0 .. min(k, n-k)) fi end proc: 1; for n to 10 do seq(T(n, k), k = 0 .. n) end do; # yields sequence in triangular form # Emeric Deutsch, Oct 12 2010
    T := (n, k) -> `if`(n=0, 1, 2^(n-1)*binomial(n, k)*hypergeom([-k, k - n], [-n], 1/2)): seq(seq(simplify(T(n, k)), k=0..n), n=0..10); # Peter Luschny, Nov 26 2021
  • Mathematica
    T[0, 0] = 1; T[n_, k_] := 2^(n-k-1)*n!*Hypergeometric2F1[ -k, -k, -n, -1 ] / (k!*(n-k)!); Flatten[ Table[ T[n, k], {n, 0, 9}, {k, 0, n}]] (* Jean-François Alcover, Feb 01 2012, after Robert Israel *)
  • SageMath
    def T(n,k): # T = A059576
        if (k==0 or k==n): return 1 if (n==0) else 2^(n-1) # A011782
        else: return 2*T(n-1, k-1) + 2*T(n-1, k) - (2 - 0^(n-2))*T(n-2, k-1)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Sep 02 2022

Formula

T(n, n-1) = A001792(n-1).
T(2*n, n) = A052141(n).
Sum_{k=0..n} T(n, k) = A003480(n).
G.f.: U(z, w) = Sum_{n >= 0, k >= 0} U(n, k)*z^n*w^k = Sum{n >= 0, k >= 0} T(n, k)*z^(n-k)*w^k = (1-z)*(1-w)/(1 - 2*w - 2*z + 2*z*w).
Maple code gives another explicit formula for U(n, k).
From Jon Stadler (jstadler(AT)capital.edu), Apr 30 2003: (Start)
U(n,k) is the number of ways of writing the vector (n,k) as an ordered sum of vectors, equivalently, the number of paths from (0,0) to (n,k) in which steps may be taken from (i,j) to (p,q) provided (p,q) is to the right or above (i,j).
2*U(n,k) = Sum_{i <= n, j <= k} U(i,j).
U(n,k) = 2*U(n-1,k) + Sum_{i < k} U(n,i).
U(n,k) = Sum_{j=0..n+k} C(n,j-k+1)*C(k,j-n+1)*2^j. (End)
T(n, k) = 2*(T(n-1, k-1) + T(n-1, k)) - (2 - 0^(n-2))*T(n-2, k-1) for n > 1 and 1 < k < n; T(n, 0) = T(n, n) = 2*T(n-1, 0) for n > 0; and T(0, 0) = 1. - Reinhard Zumkeller, Dec 03 2004
From Emeric Deutsch, Oct 12 2010: (Start)
Sum_{k=0..n} k*T(n,k) = A181292(n).
T(n,k) = Sum_{j=0..min(k, n-k)} (-1)^j*2^(n-j-1)*binomial(k, j)*binomial(n-j, k) for (n,k) != (0,0).
G.f.: G(t,z) = (1-z)*(1-t*z)/(1 - 2*z - 2*t*z + 2*t*z^2). (End)
U(n,k) = 0 if k < 0; else U(k,n) if k > n; else 1 if n <= 1; else 3 if n = 2 and k = 1; else 2*U(n,k-1) + 2*U(n-1,k) - 2*U(n-1,k-1). - David W. Wilson; corrected in the case k > n by Robert Israel, Jun 15 2011 [Corrected by Petros Hadjicostas, Jul 16 2020]
U(n,k) = binomial(n,k) * 2^(n-1) * hypergeom([-k,-k], [n+1-k], 2) if n >= k >= 0 with (n,k) <> (0,0). - Robert Israel, Jun 15 2011 [Corrected by Petros Hadjicostas, Jul 16 2020]
U(n,k) = Sum_{0 <= i+j <= n+k-1} (-1)^j*C(i+j+1, j)*C(n+i, n)*C(k+i, k). - Masato Maruoka, Dec 10 2019
T(n, k) = 2^(n - 1)*binomial(n, k)*hypergeom([-k, k - n], [-n], 1/2) = A059474(n, k)/2 for n >= 1. - Peter Luschny, Nov 26 2021
From G. C. Greubel, Sep 02 2022: (Start)
T(n, n-k) = T(n, k).
T(n, 0) = T(n, n) = A011782(n).
T(n, n-2) = 2*A049611(n-1), n >= 2.
T(n, n-3) = 4*A049612(n-2), n >= 3.
T(n, n-4) = 8*A055589(n-3), n >= 4.
T(n, n-5) = 16*A055852(n-4), n >= 5.
T(n, n-6) = 32*A055853(n-5), n >= 6.
Sum_{k=0..floor(n/2)} T(n, k) = A181306(n). (End)

A316674 Number A(n,k) of paths from {0}^k to {n}^k that always move closer to {n}^k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 13, 26, 4, 1, 1, 75, 818, 252, 8, 1, 1, 541, 47834, 64324, 2568, 16, 1, 1, 4683, 4488722, 42725052, 5592968, 26928, 32, 1, 1, 47293, 617364026, 58555826884, 44418808968, 515092048, 287648, 64, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 10 2018

Keywords

Comments

A(n,k) is the number of nonnegative integer matrices with k columns and any number of nonzero rows with column sums n. - Andrew Howroyd, Jan 23 2020

Examples

			Square array A(n,k) begins:
  1,  1,     1,         1,              1,                    1, ...
  1,  1,     3,        13,             75,                  541, ...
  1,  2,    26,       818,          47834,              4488722, ...
  1,  4,   252,     64324,       42725052,          58555826884, ...
  1,  8,  2568,   5592968,    44418808968,      936239675880968, ...
  1, 16, 26928, 515092048, 50363651248560, 16811849850663255376, ...
		

Crossrefs

Columns k=0..3 give: A000012, A011782, A052141, A316673.
Rows n=0..2 give: A000012, A000670, A059516.
Main diagonal gives A316677.

Programs

  • Maple
    A:= (n, k)-> `if`(k=0, 1, ceil(2^(n-1))*add(add((-1)^i*
         binomial(j, i)*binomial(j-i, n)^k, i=0..j), j=0..k*n)):
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    A[n_, k_] := Sum[If[k == 0, 1, Binomial[j+n-1, n]^k] Sum[(-1)^(i-j)* Binomial[i, j], {i, j, n k}], {j, 0, n k}];
    Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Nov 04 2021 *)
  • PARI
    T(n,k)={my(m=n*k); sum(j=0, m, binomial(j+n-1,n)^k*sum(i=j, m, (-1)^(i-j)*binomial(i, j)))} \\ Andrew Howroyd, Jan 23 2020

Formula

A(n,k) = A262809(n,k) * A011782(n) for k>0, A(n,0) = 1.
A(n,k) = Sum_{j=0..n*k} binomial(j+n-1,n)^k * Sum_{i=j..n*k} (-1)^(i-j) * binomial(i,j). - Andrew Howroyd, Jan 23 2020

A316673 Number of paths from (0,0,0) to (n,n,n) that always move closer to (n,n,n).

Original entry on oeis.org

1, 13, 818, 64324, 5592968, 515092048, 49239783968, 4831678931008, 483371425775744, 49083260519243008, 5043379069021557248, 523221884090930480128, 54715789513061864081408, 5760456190025868833542144, 609948004367577499751948288, 64905519628343663567453569024
Offset: 0

Views

Author

Alois P. Heinz, Jul 10 2018

Keywords

Crossrefs

Column k=3 of A316674.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<4, [1, 13, 818, 64324][n+1],
         (2*(3*n-2)*(57*n^2-95*n+25)*a(n-1)-4*(9*n^3-30*n^2+29*n-6)*
          a(n-2)+8*(3*n-1)*(n-2)^2*a(n-3))/(n^2*(3*n-4)))
        end:
    seq(a(n), n=0..20);
  • Mathematica
    a[n_] := a[n] = If[n < 4, {1, 13, 818, 64324}[[n+1]], (2(3n-2)(57n^2- 95n+25) a[n-1] - 4(9n^3-30n^2+29n-6) a[n-2] + 8(3n-1)(n-2)^2 a[n-3]) / (n^2 (3n-4))];
    a /@ Range[0, 20] (* Jean-François Alcover, May 14 2020, after Maple *)

Formula

Recurrence: see Maple program.
a(n) = A126086(n) * ceiling(2^(n-1)) = A126086(n) * A011782(n).
a(n) ~ sqrt((6 + 5*2^(1/3) + 4*2^(2/3))/6) * (24*2^(2/3) + 30*2^(1/3) + 38)^n / (4*Pi*n). - Vaclav Kotesovec, May 14 2020
G.f.: (1+hypergeom([1/3, 2/3],[1],108*x/(1-2*x)^3)/(1-2*x))/2. - Mark van Hoeij, Nov 28 2024

A331396 Number of nonnegative integer matrices with 2 distinct columns and any number of nonzero rows with column sums n and columns in decreasing lexicographic order.

Original entry on oeis.org

1, 12, 124, 1280, 13456, 143808, 1556416, 17006592, 187207936, 2072947712, 23063919616, 257634271232, 2887544049664, 32456082440192, 365710391885824, 4129672996585472, 46721752249729024, 529486122704437248, 6009576477811277824, 68299997524116111360
Offset: 1

Views

Author

Andrew Howroyd, Jan 15 2020

Keywords

Comments

The condition that the columns be in decreasing order is equivalent to considering nonequivalent matrices with distinct columns up to permutation of columns.

Crossrefs

Column k=2 of A331278.

Programs

  • PARI
    seq(n)={Vec(1/(4*sqrt(1 - 12*x + 4*x^2 + O(x*x^n))) - 1/(4*(1-2*x)))}

Formula

a(n) = (A052141(n) - A011782(n))/2.
G.f.: 1/(4*sqrt(1 - 12*x + 4*x^2)) - 1/(4*(1-2*x)).
a(n) = A011782(n) * A047665(n).

A331397 Number of nonnegative integer matrices with 2 distinct columns and any number of nonzero rows with column sums n and columns in decreasing lexicographic order.

Original entry on oeis.org

1, 2, 14, 128, 1288, 13472, 143840, 1556480, 17006720, 187208192, 2072948224, 23063920640, 257634273280, 2887544053760, 32456082448384, 365710391902208, 4129672996618240, 46721752249794560, 529486122704568320, 6009576477811539968, 68299997524116635648
Offset: 0

Views

Author

Andrew Howroyd, Jan 15 2020

Keywords

Comments

The condition that the columns be in nonincreasing order is equivalent to considering nonequivalent matrices up to permutation of columns.

Crossrefs

Column k=2 of A331315.

Programs

  • PARI
    seq(n)={Vec(1/(4*sqrt(1 - 12*x + 4*x^2 + O(x*x^n))) + (3 - 4*x)/(4*(1-2*x)))} \\ Andrew Howroyd, Jan 15 2020

Formula

a(n) = (A052141(n) + A011782(n))/2.
G.f.: 1/(4*sqrt(1 - 12*x + 4*x^2)) + (3 - 4*x)/(4*(1-2*x)).
a(n) = A011782(n) * A226994(n).
D-finite with recurrence n*a(n) +2*(-8*n+5)*a(n-1) +28*(2*n-3)*a(n-2) +8*(-8*n+19)*a(n-3) +16*(n-3)*a(n-4)=0. - R. J. Mathar, Mar 13 2023

A316649 Triangle read by rows in which T(n,k) is the number of length k chains from (0,0) to (n,n) of the poset [n] X [n] ordered by the product order, 0 <= k <= 2n, n>=0.

Original entry on oeis.org

1, 0, 1, 2, 0, 1, 7, 12, 6, 0, 1, 14, 55, 92, 70, 20, 0, 1, 23, 153, 471, 780, 720, 350, 70, 0, 1, 34, 336, 1584, 4251, 7002, 7238, 4592, 1638, 252, 0, 1, 47, 640, 4210, 16175, 39733, 65226, 72660, 54390, 26250, 7392, 924, 0, 1, 62, 1107, 9596, 49225, 164898, 380731, 623576, 732618, 614700, 360162, 140184, 32604, 3432
Offset: 0

Views

Author

Geoffrey Critzer, Jul 09 2018

Keywords

Examples

			Triangle begins:
  1;
  0, 1,  2;
  0, 1,  7,  12,    6;
  0, 1, 14,  55,   92,   70,   20;
  0, 1, 23, 153,  471,  780,  720,  350,   70;
  0, 1, 34, 336, 1584, 4251, 7002, 7238, 4592, 1638, 252;
  ...
		

Crossrefs

Columns k=0-2 give: A000007, A057427, A008865(n+1) for n>0.
Row sums give A052141.
T(n,n) gives A108628(n-1) for n>0.
T(n,2n) gives A000984.
Cf. A007318.

Programs

  • Maple
    b:= proc(n, m) option remember; expand(`if`(n+m=0, 1, add(add(
         `if`(i+j=0, 0, b(sort([n-i, m-j])[])*x), j=0..m), i=0..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..8);  # Alois P. Heinz, Jul 10 2018
  • Mathematica
    Join[{{1}},Table[a =Sort[Level[Table[Table[{i, j}, {i, 0, n}], {j, 0, n}], {2}]];f[list1_, list2_] :=Boole[(list1 - list2)[[1]] < 1 \[And] (list1 - list2)[[2]] < 1];m = Table[Table[f[a[[l]], a[[k]]], {k, 1, Length[a]}], {l, 1, Length[a]}];Prepend[Table[
         MatrixPower[m - IdentityMatrix[(n + 1)^2], k][[1, (n + 1)^2]], {k, 1, 2 n}], 0], {n, 1, 7}]] // Grid

A337192 Triangular array read by rows. T(n,k) is the number of elements of rank k in the order complex of the poset P = [n] X [n], n=0, k=0 or n>0, 0<=k<=2n-1.

Original entry on oeis.org

1, 1, 1, 1, 4, 5, 2, 1, 9, 27, 37, 24, 6, 1, 16, 84, 216, 309, 252, 110, 20, 1, 25, 200, 800, 1875, 2751, 2570, 1490, 490, 70, 1, 36, 405, 2290, 7755, 17088, 25493, 26070, 18060, 8120, 2142, 252, 1, 49, 735, 5537, 25235, 76293, 160867, 242845, 264936, 207690, 114282, 41958, 9240, 924
Offset: 0

Views

Author

Geoffrey Critzer, Aug 18 2020

Keywords

Comments

The poset P = [n] X [n] is the direct product of two chains of length n-1. The order complex of P is the set of all chains in P ordered by inclusion.
It appears that for n > 1, Sum_{k=0..2n-1} T(n,k) = 4*A052141(n-1). More generally, it appears that the number of elements in the order complex of [n]^k is four times the number of chains from bottom to top in [n]^k (Cf. A316674).

Examples

			  1,
  1, 1,
  1, 4,  5,   2,
  1, 9,  27,  37,  24,   6,
  1, 16, 84,  216, 309,  252,  110,  20,
  1, 25, 200, 800, 1875, 2751, 2570, 1490, 490, 70
		

Crossrefs

Programs

  • Mathematica
    f[x_, y_] := If[x <= y, 1, 0];Prepend[CoefficientList[ 1 + z (Table[G = Array[f, {n, n}]; \[Zeta] = Level[Table[Table[Flatten[TensorProduct[G, G][[i]][[All, j]]], {j, 1, n}], {i, 1, n}], {2}];a = Inverse[IdentityMatrix[n^2] - z (\[Zeta] - IdentityMatrix[n^2])];Table[1, {n^2}].a.Table[1, {n^2}], {n, 1, 10}]),
       z], {1}] // Grid
Showing 1-9 of 9 results.