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-23 of 23 results.

A237124 Triangle of numbers related to Catalan numbers (A000108).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 4, 3, 1, 9, 11, 8, 4, 1, 28, 33, 24, 13, 5, 1, 90, 104, 76, 43, 19, 6, 1, 297, 339, 249, 145, 69, 26, 7, 1, 1001, 1133, 836, 497, 248, 103, 34, 8, 1, 3432, 3861, 2860, 1727, 891, 394, 146, 43, 9, 1, 11934, 13364, 9932, 6071, 3211, 1484, 593, 199, 53, 10, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 03 2014

Keywords

Comments

Riordan array (1 +x +x^2*C(x)^3, x*C(x)) where C(x) is the g.f. of A000108.
Diagonal sums are A000108(n).
Row sums are T(n+1,1).
T(n,0) = A071724(n-1).
T(n,1) = A220902(n), n>=2.
T(n,2) = A228404(n-2), n>=4.
T(n+3,3) = A033434(n).
T(n,n) = 1.
T(n+1,n) = n+1.
T(n+2,n) = A034856(n+1).

Examples

			Triangle begins:
      1;
      1,     1;
      1,     2,    1;
      3,     4,    3,    1;
      9,    11,    8,    4,    1;
     28,    33,   24,   13,    5,    1;
     90,   104,   76,   43,   19,    6,   1;
    297,   339,  249,  145,   69,   26,   7,   1;
   1001,  1133,  836,  497,  248,  103,  34,   8,  1;
   3432,  3861, 2860, 1727,  891,  394, 146,  43,  9,  1;
  11934, 13364, 9932, 6071, 3211, 1484, 593, 199, 53, 10, 1;
  ...
		

Crossrefs

Cf. A000108.

Programs

  • Mathematica
    b[n_, k_]:= Binomial[2*n-k+1, n-k];
    T[n_, k_]:= If[n<3, Binomial[n, k], b[n, k] -2*b[n, k+1] -b[n, k+2] +3*b[n, k+3] - 2*b[n, k+4]];
    Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, May 08 2021 *)
  • Sage
    def b(n,k): return binomial(2*n-k+1, n-k)
    def T(n,k): return binomial(n,k) if (n<3) else b(n,k) -2*b(n, k+1) -b(n, k+2) +3*b(n, k+3) -2*b(n, k+4)
    flatten([[T(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 08 2021

Formula

From Peter Bala, Feb 18 2018: (Start)
T(n,k) = C(2*n+1-k, n-k) - 2*C(2*n-k, n-k-1) - C(2*n-1-k, n-k-2) + 3*C(2*n-2-k, n-k-3) - 2*C(2*n-3-k, n-k-4), for n > 2, otherwise C(n, k).
The n-th row polynomial of the row reverse triangle equals the n-th degree Taylor polynomial of the function (1 - x^2 + x^3)*(1 - 2*x)/(1 - x)^2 * 1/(1 - x)^n about 0. For example, for n = 4, (1 - x^2 + x^3)*(1 - 2*x)/(1 - x)^2 * 1/(1 - x)^4 = 1 + 4*x + 8*x^2 + 11*x^3 + 9*x^4 + O(x^5), giving (9, 11, 8, 4, 1) as row 4. (End)

A356261 Partition triangle read by rows, counting irreducible permutations with weakly decreasing Lehmer code, refining triangle A119308.

Original entry on oeis.org

1, 1, 0, 1, 0, 2, 1, 0, 2, 1, 5, 1, 0, 2, 2, 7, 7, 9, 1, 0, 2, 2, 1, 9, 18, 3, 16, 24, 14, 1, 0, 2, 2, 2, 11, 22, 11, 11, 25, 75, 25, 30, 60, 20, 1, 0, 2, 2, 2, 1, 13, 26, 26, 13, 13, 36, 108, 54, 108, 9, 55, 220, 110, 50, 125, 27, 1
Offset: 0

Views

Author

Peter Luschny, Aug 16 2022

Keywords

Examples

			Partition table T(n, k) begins:
[0] 1;
[1] 1;
[2] 0, 1;
[3] 0, 2, 1;
[4] 0, [2, 1],  5,  1;
[5] 0, [2, 2], [7,  7],   9,  1;
[6] 0, [2, 2,  1], [9,   18, 3], [16, 24], 14,    1;
[7] 0, [2, 2,  2], [11,  22, 11, 11], [25, 75,  25], [30, 60],  20, 1;
[8] 0, [2, 2, 2, 1],[13, 26, 26, 13, 13],[36, 108, 54, 108,9],[55, 220, 110],[50, 125], 27, 1;
Summing the bracketed terms reduces the triangle to A119308.
		

Crossrefs

Cf. A356264, A119308 (reduced), A071724 (row sums).

Programs

  • SageMath
    # using function perm_red_stats and reducible from A356264
    def weakly_decreasing(L: list[int]) -> bool:
        return all(x >= y for x, y in zip(L, L[1:]))
    @cache
    def A356261_row(n: int) -> list[int]:
        if n < 2: return [1]
        return [0] + [v[1] for v in perm_red_stats(n, irreducible, weakly_decreasing)]
    def A356261(n: int, k: int) -> int:
        return A356261_row(n)[k]
    for n in range(8):
        print([n], A356261_row(n))

A097608 Triangle read by rows: number of Dyck paths of semilength n and having abscissa of the leftmost valley equal to k (if no valley, then it is taken to be 2n; 2<=k<=2n).

Original entry on oeis.org

1, 1, 0, 1, 2, 1, 1, 0, 1, 5, 3, 3, 1, 1, 0, 1, 14, 9, 9, 4, 3, 1, 1, 0, 1, 42, 28, 28, 14, 10, 4, 3, 1, 1, 0, 1, 132, 90, 90, 48, 34, 15, 10, 4, 3, 1, 1, 0, 1, 429, 297, 297, 165, 117, 55, 35, 15, 10, 4, 3, 1, 1, 0, 1, 1430, 1001, 1001, 572, 407, 200, 125, 56, 35, 15, 10, 4, 3, 1, 1, 0, 1
Offset: 1

Views

Author

Emeric Deutsch, Aug 30 2004, Dec 22 2004

Keywords

Comments

A valley point is a path vertex that is preceded by a downstep and followed by an upstep (or by nothing at all). T(n,k) is the number of Dyck n-paths whose first valley point is at position k, 2<=k<=2n. - David Callan, Mar 02 2005
Row n has 2n-1 terms.
Row sums give the Catalan numbers (A000108).
Columns k=2 through 7 are respectively A000108, A000245, A071724, A002057, A071725, A026013. The nonzero entries in the even-indexed columns approach A088218 and similarly the odd-indexed columns approach A001791.

Examples

			Triangle begins
\ k..2...3...4...5...6...7....
n
1 |..1
2 |..1...0...1
3 |..2...1...1...0...1
4 |..5...3...3...1...1...0...1
5 |.14...9...9...4...3...1...1...0...1
6 |.42..28..28..14..10...4...3...1...1...0...1
7 |132..90..90..48..34..15..10...4...3...1...1...0...1
T(4,3)=3 because we have UU(DU)DDUD, UU(DU)DUDD and UU(DU)UDDD, where U=(1,1), D=(1,-1) (the first valley, with abscissa 3, is shown between parentheses).
		

Crossrefs

Programs

  • Maple
    G:=t^2*z*C*(1-t*z)/(1-t^2*z)/(1-t*z*C): C:=(1-sqrt(1-4*z))/2/z: Gser:=simplify(series(G,z=0,11)): for n from 1 to 10 do P[n]:=coeff(Gser,z^n) od: seq(seq(coeff(P[n],t^k),k=2..2*n),n=1..10);

Formula

G.f.=t^2*zC(1-tz)/[(1-t^2*z)(1-tzC)], where C=[1-sqrt(1-4z)]/(2z) is the Catalan function.
G.f. Sum_{2<=k<=2n}T(n, k)x^n*y^k = ((1 - (1 - 4*x)^(1/2))*y^2*(1 - x*y))/(2*(1 - ((1 - (1 - 4*x)^(1/2))*y)/2)*(1 - x*y^2)). With G:= (1 - (1 - 4*x)^(1/2))/2, the gf for column 2k is G(G^(2k+1)(G-x)-x^(k+1)(1-G))/(G^2-x) and for column 2k+1 is G(G-x)(G^(2k+2)-x^(k+1))/(G^2-x). - David Callan, Mar 02 2005

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 23 2007
Previous Showing 21-23 of 23 results.