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.

Previous Showing 21-27 of 27 results.

A379034 Number of intervals in the lattice of Motzkin paths of length n.

Original entry on oeis.org

1, 1, 3, 9, 36, 156, 754, 3886, 21239, 121411, 721189, 4423167, 27884979, 180023715, 1186646085, 7966608939, 54362492505, 376401432105, 2640553802523, 18745081044417, 134511480800046, 974773373273658, 7127937477283896, 52556513927004360, 390494071802647015
Offset: 0

Views

Author

Ludovic Schwob, Dec 14 2024

Keywords

Comments

a(n) is the number of nested pairs of Motzkin paths of length n.

Examples

			The a(3) = 9 pairs of Motzkin paths are:
                     _
  ___   _/\   /\_   / \   _/\
  ___   ___   ___   ___   _/\
.
   _           _     _
  / \   /\_   / \   /_\
  _/\   /\_   /\_   / \
		

Crossrefs

Cf. A001006 (number of Motzkin paths), A005700 (number of intervals in the lattice of Dyck paths), A379035 (number of intervals in the lattice of Schroeder paths).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, [1$2, 3][n+1],
          (n*(7*n+13)*(n+3)*a(n-1)+3*(n+1)*(n-1)*(7*n+6)*a(n-2)
            -27*(n+1)*(n-1)*(n-2)*a(n-3))/((n+4)*(n+3)^2))
        end:
    seq(a(n), n=0..24);  # Alois P. Heinz, Dec 14 2024
  • Python
    from collections import defaultdict
    def a_gen(n): #generator of terms a(0) to a(n)
        D = {(0,0):1}
        yield 1
        for k in range(n):
            D2 = defaultdict(int)
            for i,j in D:
                d = D[(i,j)]
                for a in range(-1,2):
                    for b in range(-1,2):
                        if 0 <= i+a <= j+b <= n-k-1:
                            D2[(i+a,j+b)] += d
            D = D2
            yield D[(0,0)]

A379035 Number of intervals in the lattice of Schroeder paths of length 2*n.

Original entry on oeis.org

1, 3, 20, 201, 2574, 38740, 654334, 12050561, 237383562, 4935186778, 107233505624, 2417430607946, 56224895607144, 1343171657532430, 32841495349026802, 819503313717327041, 20820095694805722362, 537474654188020125882, 14075078600122360679520, 373373810133893669112710
Offset: 0

Views

Author

Ludovic Schwob, Dec 14 2024

Keywords

Comments

a(n) is the number of nested pairs of Schroeder paths of length 2*n.

Examples

			The a(2) = 20 pairs of Schroeder paths are:
.                              __
  ____   __/\   /\__   /\/\   /  \
  ____   ____   ____   ____   ____
.
   /\                   __     /\
  /  \   __/\   /\/\   /  \   /  \
  ____   __/\   __/\   __/\   __/\
.
                 __     /\
  /\__   /\/\   /  \   /  \   /\/\
  /\__   /\__   /\__   /\__   /\/\
.
   __     /\     __     /\     /\
  /  \   /  \   /__\   /__\   //\\
  /\/\   /\/\   /  \   /  \   /  \
		

Crossrefs

Cf. A006318 (number of Schroeder paths), A005700 (number of intervals in the lattice of Dyck paths), A379034 (number of intervals in the lattice of Motzkin paths).

Programs

  • Python
    from collections import defaultdict
    def a_gen(n): #generator of terms a(0) to a(n)
        D = {(0,0):1}
        for k in range(2*n+2):
            D2 = defaultdict(int)
            for i,j in D:
                d = D[(i,j)]
                mi,mj = (i-k)%2,(j-k)%2
                for a in range(-mi,mi+1):
                    for b in range(-mj,mj+1):
                        if 0 <= i+a <= j+b <= 2*n-k+1:
                            D2[(i+a,j+b)] += d
            D = D2
            if k%2==1:
                yield D[(0,0)]

A181571 Third column of triangle in A179898.

Original entry on oeis.org

1, 6, 40, 300, 2475, 22022, 208208, 2068560, 21414900, 229523800, 2533942752, 28698821320, 332357673375, 3925129083750, 47167131780000, 575637606165600, 7123515376299300, 89266155250239000, 1131410294476020000, 14489559984061890000, 187330691180608155180, 2443121585638964379864
Offset: 1

Views

Author

N. J. A. Sloane, Jan 30 2011

Keywords

Crossrefs

A136440 Sum of heights of all 2-watermelons with wall of length 2*n.

Original entry on oeis.org

3, 11, 60, 406, 3171, 27411, 255617, 2528613, 26224097, 282706396, 3147801820, 36022733951, 422047425238, 5046771514478, 61438059222438, 759851375725606, 9530872096367508, 121063493728881999, 1555352365759798758
Offset: 1

Views

Author

Steven Finch, Apr 02 2008

Keywords

Comments

Consider the set of all pairs of nonintersecting Dyck excursions of length 2*n (nonnegative walks with jumps -1,+1). The lower path begins and ends at 0; the upper path begins and ends at 2. a(n) is the sum of heights of all such upper-Dyck excursions.

Crossrefs

Programs

  • Mathematica
    c[n_] := 6*(2*n)!*(2*n+2)!/(n!*(n+1)!*(n+2)!*(n+3)!)
    s[n_,a_] := Sum[If[k < 1, 0, DivisorSigma[0,k]*Binomial[2*n,n+a-k]/Binomial[2*n,n]], {k,a-n,a+n}]
    t[n_,a_,b_] := Sum[If[(j < 1) || (k < 1), 0, DivisorSigma[0,GCD[j,k]]*Binomial[2*n,n+a-j]*Binomial[2*n,n+b-k]/Binomial[2*n,n]^2], {j,a-n,a+n}, {k,b-n,b+n}]
    f[n_] := (n^2+5*n+6)*(s[n,-3]+s[n,3])-(6*n^2+18*n)*(s[n,-2]+s[n,2])+(15*n^2+27*n+6)*(s[n,-1]+s[n,1])-(20*n^2+28*n+24)*s[n,0]
    g[n_] := t[n,-2,-2]-t[n,-1,-3]-2*t[n,-1,-2]+t[n,-1,-1]+2*t[n,-1,0]-t[n,-1,3]+2*t[n,0,-3]-4*t[n,0,0]+2*t[n,0,3]-t[n,1,-3]-2*t[n,1,-2]+2*t[n,1,-1]+2*t[n,1,0]+t[n,1,1]-t[n,1,3]+2*t[n,2,-2]-2*t[n,2,-1]-2*t[n,2,1]+t[n,2,2]
    h[n_] := ((n+1)*(n+2)/(12*(2*n+1)))*( (n+1)*(n+2)*(n+3)*g[n]+f[n] ) - 1
    a[n_] := h[n]*c[n]

A336674 Number of positive terms of the Okounkov-Olshanski formula for the number of standard tableaux of skew shape (n+3,n+2,...,1)/(n-1,n-2,...,1).

Original entry on oeis.org

1, 1, 5, 65, 1757, 87129, 7286709, 965911665, 193387756045, 56251615627273, 23021497112124901, 12903943243053179681, 9680994096074346690365, 9530338509606467082850745, 12099590059386455266220499477
Offset: 0

Views

Author

Alejandro H. Morales, Jul 29 2020

Keywords

Comments

a(n) is also the number of semistandard Young tableaux of skew shape (n+3,n+2,...,1)/(n-1,n-2,...,1) such that the entries in row i are at most i for i=1,...,n+3.
a(n) is also the number of semistandard Young tableaux T of shape (n-1,n-2,...,1) such that j-i < T(i,j) <= n+3 for all cells (i,j).

Examples

			For n=2 the a(2)=5 semistandard Young tableaux of skew shape (5,4,3,2,1)/(1) are determined by their first column which are [1,2,3,4], [1,2,3,5], [1,2,4,5], [1,3,4,5], and [2,3,4,5]. Also, the a(2)=5 semistandard Young tableaux of shape (1) with entries between 0 and 5 are [1], [2], [3], [4], and [5]. Also, the a(3)=70-5=65 are the semistandard Young tableaux of shape (2,1) with entries at most 6 excluding the five tableaux whose entry in the first row and first column is 1: [[1,1],[2]], [[1,1],[3]], [[1,1],[4]], and [[1,1],[5]].
		

Crossrefs

A110501, A005700 gives the number of terms of the Naruse hook length formula for the same skew shape.

Programs

  • Maple
    b := proc(n)
        return 2*(-1)^n*(1-4^n)*bernoulli(2*n)/factorial(2*n);
    end proc:
    a := proc(n)
        return factorial(2*n+4)*factorial(2*n+6)*(b(n+1)*b(n+3)-b(n+2)^2)/6;
    end proc:
    seq(a(n),n=0..10);
  • Sage
    def b(n):
        return 2*(-1)^n*(1-4^n)*bernoulli(2*n)/factorial(2*n) ;
    def a(n):
        return factorial(2*n+4)*factorial(2*n+6)*(b(n+1)*b(n+3)-b(n+2)^2)/6;
    [a(i) for i in range(10)]

Formula

a(n) = ((2*n+4)!*(2*n+6)!/3!)*(b(n+1)*b(n+3)-b(n+2)^2) where b(n)=A110501(n)/(2*n)!.

A338368 Triangle of number of 312-avoiding reduced valid hook configurations with n hooks that are on permutations with 2n + k points, for n=1 and 1<=k<=n.

Original entry on oeis.org

1, 3, 5, 14, 51, 42, 84, 485, 849, 462, 594, 4743, 13004, 14819, 6006, 4719, 48309, 182311, 322789, 271452, 87516, 40898, 511607, 2472322, 5999489, 7794646, 5182011, 13856
Offset: 1

Views

Author

Michel Marcus, Oct 23 2020

Keywords

Examples

			Triangle begins
  1
  3 5
  14 51 42
  84 485 849 462
  594 4743 13004 14819 6006
  4719 48309 182311 322789 271452 87516
  40898 511607 2472322 5999489 7794646 5182011 13856
		

Crossrefs

Cf. A005700 (1st column), A005789 (right diagonal).

A338403 Regular triangle read by rows: T(n,k) is the number of (n,k)-Duck words, for n>=1 and 0<=k<=n-1.

Original entry on oeis.org

1, 2, 3, 5, 23, 14, 14, 131, 233, 84, 42, 664, 2339, 2367, 594, 132, 3166, 18520, 36265, 24714, 4719, 429, 14545, 127511, 408311, 527757, 266219, 40898
Offset: 1

Views

Author

Michel Marcus, Oct 24 2020

Keywords

Comments

See link for the definition of Duck word.

Examples

			Triangle begins:
   1;
   2,   3;
   5,  23,   14;
  14, 131,  233,   84;
  42, 664, 2339, 2367, 594;
  ...
		

Crossrefs

Cf. A000108 (column 0), A005700 (diagonal), A005789 (row sums), A031970 (column 1).
Previous Showing 21-27 of 27 results.