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.

A165408 An aerated Catalan triangle.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 2, 0, 1, 0, 0, 0, 3, 0, 1, 0, 0, 2, 0, 4, 0, 1, 0, 0, 0, 5, 0, 5, 0, 1, 0, 0, 0, 0, 9, 0, 6, 0, 1, 0, 0, 0, 5, 0, 14, 0, 7, 0, 1, 0, 0, 0, 0, 14, 0, 20, 0, 8, 0, 1, 0, 0, 0, 0, 0, 28, 0, 27, 0, 9, 0, 1, 0, 0, 0, 0, 14, 0, 48, 0, 35, 0, 10, 0, 1, 0, 0, 0, 0, 0, 42, 0, 75, 0, 44, 0, 11, 0, 1
Offset: 0

Views

Author

Paul Barry, Sep 17 2009

Keywords

Comments

Aeration of A120730. Row sums are A165407.
T(n,k) is the number of lattice paths from (0,0) to (k,(n-k)/2) that do not go above the diagonal x=y using steps in {(1,0), (0,1)}. - Alois P. Heinz, Sep 20 2022

Examples

			Triangle T(n,k) begins:
  1;
  0, 1;
  0, 0, 1;
  0, 1, 0, 1;
  0, 0, 2, 0,  1;
  0, 0, 0, 3,  0,  1;
  0, 0, 2, 0,  4,  0,  1;
  0, 0, 0, 5,  0,  5,  0,  1;
  0, 0, 0, 0,  9,  0,  6,  0,  1;
  0, 0, 0, 5,  0, 14,  0,  7,  0, 1;
  0, 0, 0, 0, 14,  0, 20,  0,  8, 0,  1;
  0, 0, 0, 0,  0, 28,  0, 27,  0, 9,  0, 1;
  0, 0, 0, 0, 14,  0, 48,  0, 35, 0, 10, 0, 1;
  ...
		

Crossrefs

Programs

  • Magma
    A165408:= func< n,k | n le 3*k select Binomial(Floor((n+k)/2), k)*((3*k-n)/2 +1)*(1+(-1)^(n-k))/(2*(k+1)) else 0 >;
    [A165408(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Nov 09 2022
    
  • Maple
    b:= proc(x, y) option remember; `if`(y<=x, `if`(x=0, 1,
          b(x-1, y)+`if`(y>0, b(x, y-1), 0)), 0)
        end:
    T:= (n, k)-> `if`((n-k)::even, b(k, (n-k)/2), 0):
    seq(seq(T(n, k), k=0..n), n=0..14);  # Alois P. Heinz, Sep 20 2022
  • Mathematica
    b[x_, y_]:= b[x, y]= If[y<=x, If[x==0, 1, b[x-1, y] + If[y>0, b[x, y-1], 0]], 0];
    T[n_, k_]:= If[EvenQ[n-k], b[k, (n-k)/2], 0];
    Table[T[n, k], {n,0,14}, {k,0,n}]//Flatten (* Jean-François Alcover, Oct 08 2022, after Alois P. Heinz *)
  • SageMath
    def A165408(n,k): return 0 if (n>3*k) else binomial(int((n+k)/2), k)*((3*k-n+2)/2 )*(1+(-1)^(n-k))/(2*(k+1))
    flatten([[A165408(n,k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Nov 09 2022

Formula

T(n,k) = if(n<=3k, C((n+k)/2, k)*((3*k-n)/2 + 1)*(1 + (-1)^(n-k))/(2*(k+1)), 0).
G.f.: 1/(1-x*y-x^3*y/(1-x^3*y/(1-x^3*y/(1-x^3*y/(1-... (continued fraction).
Sum_{k=0..n} T(n, k) = A165407(n).
From G. C. Greubel, Nov 09 2022: (Start)
Sum_{k=0..floor(n/2)} T(n-k, k) = (1+(-1)^n)*A001405(n/2)/2.
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = (1+(-1)^n)*A105523(n/2)/2.
Sum_{k=0..n} (-1)^k*T(n, k) = (-1)^n*A165407(n).
Sum_{k=0..n} 2^k*T(n, k) = A165409(n).
T(n, n-2) = A001477(n-2), n >= 2.
T(2*n, n) = (1+(-1)^n)*A174687(n/2)/2.
T(2*n, n+1) = (1-(-1)^n)*A262394(n/2)/2.
T(2*n, n-1) = (1+(-1)^n)*A236194(n/2)/2
T(3*n-2, n) = A000108(n), n >= 1. (End)

A355173 The Fuss-Catalan triangle of order 1, read by rows. Related to binary trees.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 3, 5, 0, 1, 4, 9, 14, 0, 1, 5, 14, 28, 42, 0, 1, 6, 20, 48, 90, 132, 0, 1, 7, 27, 75, 165, 297, 429, 0, 1, 8, 35, 110, 275, 572, 1001, 1430, 0, 1, 9, 44, 154, 429, 1001, 2002, 3432, 4862, 0, 1, 10, 54, 208, 637, 1638, 3640, 7072, 11934, 16796
Offset: 0

Views

Author

Peter Luschny, Jun 25 2022

Keywords

Comments

The Fuss-Catalan triangle of order m is a regular, (0, 0)-based table recursively defined as follows: Set row(0) = [1] and row(1) = [0, 1]. Now assume row(n-1) already constructed and duplicate the last element of row(n-1). Next apply the cumulative sum m times to this list to get row(n). Here m = 1. (See the Python program for a reference implementation.)
This definition also includes the classical Fuss-Catalan numbers, since T(n, n) = A000108(n), or row 2 in A355262. For m = 2 see A355172 and for m = 3 A355174. More generally, for n >= 1 all Fuss-Catalan sequences (A355262(n, k), k >= 0) are the main diagonals of the Fuss-Catalan triangles of order n - 1.

Examples

			Table T(n, k) begins:
  [0] [1]
  [1] [0, 1]
  [2] [0, 1, 2]
  [3] [0, 1, 3,  5]
  [4] [0, 1, 4,  9,  14]
  [5] [0, 1, 5, 14,  28,  42]
  [6] [0, 1, 6, 20,  48,  90,  132]
  [7] [0, 1, 7, 27,  75, 165,  297, 429]
  [8] [0, 1, 8, 35, 110, 275,  572, 1001, 1430]
  [9] [0, 1, 9, 44, 154, 429, 1001, 2002, 3432, 4862]
Seen as an array reading the diagonals starting from the main diagonal:
  [0] 1, 1, 2,  5,  14,   42,  132,   429,  1430,   4862,   16796, ...  A000108
  [1] 0, 1, 3,  9,  28,   90,  297,  1001,  3432,  11934,   41990, ...  A000245
  [2] 0, 1, 4, 14,  48,  165,  572,  2002,  7072,  25194,   90440, ...  A099376
  [3] 0, 1, 5, 20,  75,  275, 1001,  3640, 13260,  48450,  177650, ...  A115144
  [4] 0, 1, 6, 27, 110,  429, 1638,  6188, 23256,  87210,  326876, ...  A115145
  [5] 0, 1, 7, 35, 154,  637, 2548,  9996, 38760, 149226,  572033, ...  A000588
  [6] 0, 1, 8, 44, 208,  910, 3808, 15504, 62016, 245157,  961400, ...  A115147
  [7] 0, 1, 9, 54, 273, 1260, 5508, 23256, 95931, 389367, 1562275, ...  A115148
		

Crossrefs

A000108 (main diagonal), A000245 (subdiagonal), A002057 (diagonal 2), A000344 (diagonal 3), A000027 (column 2), A000096 (column 3), A071724 (row sums), A000958 (alternating row sums), A262394 (main diagonal of array).
Variants: A009766 (main variant), A030237, A130020.
Cf. A123110 (triangle of order 0), A355172 (triangle of order 2), A355174 (triangle of order 3), A355262 (Fuss-Catalan array).

Programs

  • Python
    from functools import cache
    from itertools import accumulate
    @cache
    def Trow(n: int) -> list[int]:
        if n == 0: return [1]
        if n == 1: return [0, 1]
        row = Trow(n - 1) + [Trow(n - 1)[n - 1]]
        return list(accumulate(row))
    for n in range(11): print(Trow(n))

Formula

The general formula for the Fuss-Catalan triangles is, for m >= 0 and 0 <= k <= n:
FCT(n, k, m) = (m*(n - k) + m + 1)*(m*n + k - 1)!/((m*n + 1)!*(k - 1)!) for k > 0 and FCT(n, 0, m) = 0^n. The case considered here is T(n, k) = FCT(n, k, 1).
T(n, k) = (n - k + 2)*(n + k - 1)!/((n + 1)!*(k - 1)!) for k > 0; T(n, 0) = 0^n.
The g.f. of row n of the FC-triangle of order m is 0^n + (x - (m + 1)*x^2) / (1 - x)^(m*n + 2), thus:
T(n, k) = [x^k] (0^n + (x - 2*x^2)/(1 - x)^(n + 2)).

A277957 a(n) = (n+3)*Sum_{i=0..n} binomial(3*n-2*i+2,n-i)/(2*n-i+3).

Original entry on oeis.org

1, 5, 26, 144, 834, 4979, 30361, 188003, 1177694, 7443721, 47384897, 303389530, 1951806313, 12607088771, 81709809546, 531138264252, 3461366814726, 22607751250442, 147952881721126, 969953549401499, 6368831275489633
Offset: 0

Views

Author

Vladimir Kruchinin, Nov 05 2016

Keywords

Crossrefs

Programs

  • Maple
    h := n -> hypergeom([1,-2*n-3,-n],[-3*n/2-1,-3*n/2-1/2],1/4):
    b := n -> (n+3)*binomial(3*n+2,n)/(2*n+3): # A262394(n-1)
    a := n -> b(n)*simplify(h(n)):
    seq(a(n), n=0..21); # Peter Luschny, Nov 06 2016
  • Mathematica
    Table[(n + 3)*Sum[Binomial[3*n - 2*k + 2, n - k]/(2*n - k + 3), {k, 0, n}], {n,0,50}] (* G. C. Greubel, Jun 06 2017 *)
  • Maxima
    F(x):=x*(2/sqrt(3*x))*sin((1/3)*asin(sqrt(27*x/4)));
    taylor(diff(F(x),x)*F(x)^2/(1-F(x))/x^2,x,0,10);
    
  • PARI
    for(n=0,25, print1((n+3)*sum(k=0,n,binomial(3*n-2*k+2,n-k)/(2*n-k+3)), ", ")) \\ G. C. Greubel, Jun 06 2017

Formula

G.f.: F'(x)*F(x)^2/(1-F(x))/x^2, where F(x)/x is the g.f. of A001764.
From Vaclav Kotesovec, Nov 06 2016: (Start)
Recurrence: 2*(n+1)*(2*n + 3)*(91*n^4 - 24*n^3 - 313*n^2 + 246*n - 24)*a(n) = (2821*n^6 + 5080*n^5 - 12775*n^4 - 5200*n^3 + 8454*n^2 + 420*n - 720)*a(n-1) - (2821*n^6 + 5080*n^5 - 12775*n^4 - 5200*n^3 + 8454*n^2 + 420*n - 720)*a(n-2) + 3*(3*n - 4)*(3*n - 2)*(91*n^4 + 340*n^3 + 161*n^2 - 88*n - 24)*a(n-3).
a(n) ~ 3^(3*n+9/2) / (7 * sqrt(Pi*n) * 2^(2*n+4)). (End)
a(n) = A262394(n-1)*hypergeom([1,-2*n-3,-n],[-3*n/2-1,-3*n/2-1/2],1/4). - Peter Luschny, Nov 06 2016
Showing 1-3 of 3 results.