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

A114462 Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having k ascents of length 2 starting at an even level (0<=k<=floor(n/2)).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 6, 7, 1, 18, 19, 5, 54, 59, 18, 1, 166, 191, 65, 7, 522, 631, 242, 34, 1, 1670, 2123, 906, 154, 9, 5418, 7247, 3395, 680, 55, 1, 17786, 25011, 12746, 2932, 300, 11, 58974, 87071, 47931, 12414, 1540, 81, 1, 197226, 305275, 180439, 51878, 7552
Offset: 0

Views

Author

Emeric Deutsch, Nov 29 2005

Keywords

Comments

Row n has 1+floor(n/2) terms. Row sums are the Catalan numbers (A000108). Sum(kT(n,k), k=0..floor(n/2)) = binomial(2n-3,n-1)-binomial(2n-4,n) = A077587(n-2) (n>=2). Column 0 yields A114464.

Examples

			T(4,1) = 7 because we have (UU)DDUDUD, UD(UU)DDUD, UDUD(UU)DD, (UU)DUDDUD,
UD(UU)DUDD, (UU)DUDUDD and (UU)DUUDDD, where U=(1,1), D=(1,-1) (the ascents of length 2 starting at an even level are shown between parentheses; note that the last path has an ascent of length 2 that starts at an odd level).
Triangle starts:
1;
1;
1,   1;
2,   3;
6,   7,  1;
18, 19,  5;
54, 59, 18, 1;
		

Crossrefs

Programs

  • Maple
    G:= 1/2/z*(3*z^2+2*z^3*t+1-z^3*t^2-3*z^2*t-z^3+t*z-z -sqrt(1+20*z^3*t-18*z^5*t^2+15*z^4*t^2+18*z^5*t+6*z^5*t^3-2*z^4*t^3-12*z^2*t -12*z^3 -6*z-24*z^4*t-8*z^3*t^2+z^6-6*z^5+11*z^4 +z^2*t^2+6*z^6*t^2 -4*z^6*t^3 -4*z^6*t+z^6*t^4+2*t*z +11*z^2)): Gser:=simplify(series(G,z=0,17)): P[0]:=1: for n from 1 to 14 do P[n]:=coeff(Gser,z^n) od: for n from 0 to 14 do seq(coeff(t*P[n],t^j),j=1..1+floor(n/2)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0, `if`(x=0,
          `if`(t=2, z, 1), expand(b(x-1, y-1, min(3, t+1))+
          `if`(t=2 and irem(y, 2)=0, z, 1)*b(x-1, y+1, 0))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0$2)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Mar 12 2014
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x, 0, If[x==0, If[t==2, z, 1], Expand[ b[x-1, y-1, Min[3, t+1]] + If[t==2 && Mod[y, 2]==0, z, 1]*b[x-1, y+1, 0]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 0]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Mar 31 2015, after Alois P. Heinz *)

Formula

G.f.: G(t,z) satisfies zG^2-(1-z+tz-3tz^2+3z^2-z^3-t^2z^3+2tz^3)G+1-z+z^2+tz-tz^2=0.

A352680 Array read by ascending antidiagonals. A family of Catalan-like sequences. A(n, k) = [x^k] ((n - 1)*x + 1)*(1 - sqrt(1 - 4*x))/(2*x).

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 2, 2, 3, 1, 3, 3, 5, 9, 1, 4, 4, 7, 14, 28, 1, 5, 5, 9, 19, 42, 90, 1, 6, 6, 11, 24, 56, 132, 297, 1, 7, 7, 13, 29, 70, 174, 429, 1001, 1, 8, 8, 15, 34, 84, 216, 561, 1430, 3432, 1, 9, 9, 17, 39, 98, 258, 693, 1859, 4862, 11934, 1, 10, 10, 19, 44, 112, 300, 825, 2288, 6292, 16796, 41990
Offset: 0

Views

Author

Peter Luschny, Mar 27 2022

Keywords

Examples

			Array starts:
n\k 0, 1,  2,  3,  4,   5,   6,    7,    8,     9, ...
------------------------------------------------------
[0] 1, 0,  1,  3,  9,  28,  90,  297, 1001,  3432, ... A071724
[1] 1, 1,  2,  5, 14,  42, 132,  429, 1430,  4862, ... A000108
[2] 1, 2,  3,  7, 19,  56, 174,  561, 1859,  6292, ... A071716
[3] 1, 3,  4,  9, 24,  70, 216,  693, 2288,  7722, ... A038629
[4] 1, 4,  5, 11, 29,  84, 258,  825, 2717,  9152, ... A352681
[5] 1, 5,  6, 13, 34,  98, 300,  957, 3146, 10582, ...
[6] 1, 6,  7, 15, 39, 112, 342, 1089, 3575, 12012, ...
[7] 1, 7,  8, 17, 44, 126, 384, 1221, 4004, 13442, ...
[8] 1, 8,  9, 19, 49, 140, 426, 1353, 4433, 14872, ...
[9] 1, 9, 10, 21, 54, 154, 468, 1485, 4862, 16302, ...
.
Seen as a triangle:
[0] 1;
[1] 1, 0;
[1] 1, 1, 1;
[2] 1, 2, 2,  3;
[3] 1, 3, 3,  5,  9;
[4] 1, 4, 4,  7, 14, 28;
[5] 1, 5, 5,  9, 19, 42,  90;
[6] 1, 6, 6, 11, 24, 56, 132, 297;
		

Crossrefs

Diagonals: A077587 (main), A271823.
Compare A352682 for a similar array based on the Bell numbers.

Programs

  • Julia
    # Compare with the Julia function A352686Row.
    function A352680Row(n, len)
        a = BigInt(n)
        P = BigInt[1]; T = BigInt[1]
        for k in 0:len-1
            T = push!(T, a)
            P = cumsum(push!(P, a))
            a = P[end]
        end
    T end
    for n in 0:9 println(A352680Row(n, 9)) end
  • Maple
    for n from 0 to 9 do
        ogf := ((n - 1)*x + 1)*(1 - sqrt(1 - 4*x))/(2*x);
        ser := series(ogf, x, 12):
        print(seq(coeff(ser, x, k), k = 0..9)); od:
    # Alternative:
    alias(PS = ListTools:-PartialSums):
    CatalanRow := proc(n, len) local a, k, P, R;
    a := n; P := [1]; R := [1];
    for k from 0 to len-1 do
        R := [op(R), a]; P := PS([op(P), a]); a := P[-1] od;
    R end: seq(lprint(CatalanRow(n, 9)), n = 0..9);
    # Recurrence:
    A := proc(n, k) option remember: if k < 3 then [1, n, n + 1][k + 1] else
    A(n, k-1)*((6 - 4*k)*(n - 3 + k*(3 + n)))/((1 + k)*(6 - k*(3 + n))) fi end:
    seq(print(seq(A(n, k), k = 0..9)), n = 0..9);
  • Mathematica
    T[n_, 0] := 1;
    T[n_, k_] := (n - 1) CatalanNumber[k - 1] + CatalanNumber[k];
    Table[T[n, k], {n, 0, 9}, {k, 0, 9}] // TableForm

Formula

A(n, k) = (n-1)*CatalanNumber(k-1) + CatalanNumber(k) for n >= 0 and k >= 1, A(n, 0) = 1. (Cf. A352682.)
D-finite with recurrence: A(n, k) = A(n, k-1)*((6 - 4*k)*(n - 3 + k*(3 + n)))/((1 + k)*(6 - k*(3 + n))) for k >= 3, otherwise 1, n, n + 1 for k = 0, 1, 2.
Given a list T let PS(T) denote the list of partial sums of T. Given two list S and T let [S, T] denote the concatenation of the lists. Further let P[end] denote the last element of the list P. Row n of the array A with length k can be computed by the following procedure:
A = [n], P = [1], R = [1];
Repeat k times: R = [R, A], P = PS([P, A]), A = [P[end]];
Return R.

A274883 Triangle read by rows, T(n,k) = 2^k*binomial(n,k)*A057977(n-k) for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 1, 2, 1, 4, 4, 3, 6, 12, 8, 2, 24, 24, 32, 16, 10, 20, 120, 80, 80, 32, 5, 120, 120, 480, 240, 192, 64, 35, 70, 840, 560, 1680, 672, 448, 128, 14, 560, 560, 4480, 2240, 5376, 1792, 1024, 256, 126, 252, 5040, 3360, 20160, 8064, 16128, 4608, 2304, 512
Offset: 0

Views

Author

Peter Luschny, Jul 14 2016

Keywords

Examples

			Triangle starts:
                       1;
                      1, 2;
                    1, 4, 4;
                  3, 6, 12, 8;
               2, 24, 24, 32, 16;
            10, 20, 120, 80, 80, 32;
         5, 120, 120, 480, 240, 192, 64;
     35, 70, 840, 560, 1680, 672, 448, 128;
14, 560, 560, 4480, 2240, 5376, 1792, 1024, 256;
		

Crossrefs

Cf. A000079 (T(n,n)), A057977 (T(n,0)), A077587 (row sum).
Cf. A189912. Row reversed A091894 is a subtriangle.

Programs

  • Maple
    T := (n,k) -> 2^k*binomial(n,k)*((n-k)!/floor((n-k)/2)!^2)/(floor((n-k)/2)+1);
    seq(seq(T(n,k), k=0..n), n=0..9);
Showing 1-3 of 3 results.