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.

A124642 Antidiagonal sums of A096465.

Original entry on oeis.org

1, 1, 2, 3, 5, 9, 15, 29, 50, 99, 176, 351, 638, 1275, 2354, 4707, 8789, 17577, 33099, 66197, 125477, 250953, 478193, 956385, 1830271, 3660541, 7030571, 14061141, 27088871, 54177741, 104647631, 209295261, 405187826, 810375651, 1571990936, 3143981871, 6109558586, 12219117171, 23782190486, 47564380971, 92705454896
Offset: 0

Views

Author

Gerald McGarvey, Dec 21 2006

Keywords

Comments

Apparently bisections give A024718 and A006134 and are related to A078478, A100066 and A105848.

Crossrefs

Programs

  • Magma
    a:= func< n | n eq 0 select 1 else (1+(-1)^n)/2 + (&+[ (&+[ ((n-2*j)/(n-2*k))*Binomial(n-2*k, n-k-j) : k in [0..j]]) : j in [0..Floor((n-1)/2)]]) >;
    [a(n): n in [0..45]]; // G. C. Greubel, Apr 30 2021
    
  • Mathematica
    a[, 0]=1; a[n, n_]=1; a[n_, m_]:= a[n, m] = a[n-1, m] + a[n, m-1]; a[n_, m_] /; n<0 || m>n = 0; Table[ Sum[a[n-m, m], {m,0,n}], {n,0,45}] (* Jean-François Alcover, Dec 17 2012 *)
    a[n_]:= a[n]= (1+(-1)^n)/2 + Sum[(n-2*j)*Binomial[n-2*k, n-k-j]/(n-2*k), {j,0,(n-1)/2}, {k,0,j}]; Table[a[n], {n,0,45}] (* G. C. Greubel, Apr 30 2021 *)
  • Sage
    def a(n): return (1+(-1)^n)/2 + sum( sum( ((n-2*j)/(n-2*k))*binomial(n-2*k, n-k-j) for k in (0..j)) for j in (0..(n-1)//2))
    [a(n) for n in (0..45)] # G. C. Greubel, Apr 30 2021

Formula

Conjecture: G.f.: -(1/2)*z*(2*z+(1-4*z^2)^(1/2)+1)/(1-4*z^2)^(1/2)/(z^2-1). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009
From G. C. Greubel, Apr 30 2021: (Start)
a(n) = (1 + (-1)^n)/2 + Sum_{j=0..floor((n-1)/2)} Sum_{k=0..j} (n-2*j)*binomial(n -2*k, n-k-j)/(n-2*k).
a(n) = Sum_{j=0..floor(n/2)} Sum_{k=0..j} ((n-2*j)/(n-k-j))*binomial(n-2*k, n-k-j). (End)

Extensions

Offset changed by Reinhard Zumkeller, Jul 12 2012
Terms a(18) onward added by G. C. Greubel, Apr 30 2021

A091491 Triangle, read by rows, where the n-th diagonal is generated from the n-th row by the sum of the products of the n-th row terms with binomial coefficients.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 9, 8, 4, 1, 1, 23, 22, 13, 5, 1, 1, 65, 64, 41, 19, 6, 1, 1, 197, 196, 131, 67, 26, 7, 1, 1, 626, 625, 428, 232, 101, 34, 8, 1, 1, 2056, 2055, 1429, 804, 376, 144, 43, 9, 1, 1, 6918, 6917, 4861, 2806, 1377, 573, 197, 53, 10, 1
Offset: 0

Views

Author

Paul D. Hanna, Jan 14 2004

Keywords

Comments

Row sums are A014137 (partial sums of Catalan numbers A000108). Columns equal the partial sums of the columns of the Catalan convolution triangle A033184. Columns include A014137, A014138, A001453.
Apart from the first column, any term is the partial sum of terms of the row above, when summing from the right. - Ralf Stephan, Apr 27 2004
Matrix inverse equals triangle A104402.
Riordan array (1/(1-x), x*c(x)) where c(x) is the g.f. of A000108. - Philippe Deléham, Nov 04 2009

Examples

			T(7,3) = T(4,0)*C(2,2) + T(4,1)*C(3,2) + T(4,2)*C(5,2) + T(4,3)*C(6,2) = (1)*1 + (4)*3 + (3)*6 + (1)*10 = 41.
Rows begin:
  1;
  1,     1;
  1,     2,     1;
  1,     4,     3,     1;
  1,     9,     8,     4,     1;
  1,    23,    22,    13,     5,     1;
  1,    65,    64,    41,    19,     6,    1;
  1,   197,   196,   131,    67,    26,    7,    1;
  1,   626,   625,   428,   232,   101,   34,    8,    1;
  1,  2056,  2055,  1429,   804,   376,  144,   43,    9,   1;
  1,  6918,  6917,  4861,  2806,  1377,  573,  197,   53,  10,  1;
  1, 23714, 23713, 16795,  9878,  5017, 2211,  834,  261,  64, 11,  1;
  1, 82500, 82499, 58785, 35072, 18277, 8399, 3382, 1171, 337, 76, 12, 1;
  ...
As to the production matrix M, top row of M^3 = [1, 4, 3, 1, 0, 0, 0, ...].
		

Crossrefs

Programs

  • Haskell
    a091491 n k = a091491_tabl !! n !! k
    a091491_row n = a091491_tabl !! n
    a091491_tabl = iterate (\row -> 1 : scanr1 (+) row) [1]
    -- Reinhard Zumkeller, Jul 12 2012
    
  • Magma
    A091491:= func< n,k | k eq 0 select 1 else k*(&+[Binomial(2*(n-j)-k-1, n-j-1)/(n-j): j in [0..n-k]]) >;
    [A091491(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 30 2021
    
  • Mathematica
    nmax = 11; t[n_, k_] := k*(2n-k-1)!*HypergeometricPFQ[{1, k-n, -n}, {k/2-n+1/2, k/2-n+1}, 1/4]/(n!*(n-k)!); t[, 0] = 1; Flatten[ Table[ t[n, k], {n, 0, nmax}, {k, 0, n}]] (* _Jean-François Alcover, Nov 14 2011, after Vladimir Kruchinin *)
  • PARI
    T(n,k)=if(k>n || n<0 || k<0,0,if(k==0 || k==n,1, sum(j=0,n-k,T(n-k,j)*binomial(k+j-1,k-1)););)
    for(n=0,10,for(k=0,n,print1(T(n,k),", "));print(""))
    
  • PARI
    T(n,k)=local(X=x+x*O(x^n),Y=y+y*O(y^k)); polcoeff(polcoeff(2/(2-Y*(1-sqrt(1-4*X)))/(1-X),n,x),k,y)
    for(n=0,10,for(k=0,n,print1(T(n,k),", "));print(""))
    
  • PARI
    T(n,k)=if(n
    				
  • Sage
    def A091491(n,k): return 1 if (k==0) else k*sum(binomial(2*(n-j)-k-1, n-j-1)/(n-j) for j in (0..n-k))
    flatten([[A091491(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 30 2021

Formula

T(n, k) = Sum_{j=0..n-k} T(n-k, j)*C(k+j-1, k-1).
G.f.: 2/(2-y*(1-sqrt(1-4*x)))/(1-x).
T(n, k) = T(n-1, k-1) + T(n, k+1) for n>0, with T(n, 0)=1.
Recurrence: for k>0, T(n, k) = Sum_{j=k..n} T(n-1, j). - Ralf Stephan, Apr 27 2004
T(n+2,2)= |A099324(n+2)|. - Philippe Deléham, Nov 25 2009
T(n,k) = k * Sum_{i=0..n-k} binomial(2*(n-i)-k-1, n-i-1)/(n-i) for k>0; T(n,0)=1. - Vladimir Kruchinin, Feb 07 2011
From Gary W. Adamson, Jul 26 2011: (Start)
The n-th row of the triangle is the top row of M^n, where M is the following infinite square production matrix in which a column of (1,0,0,0,...) is prepended to an infinite lower triangular matrix of all 1's and the rest zeros:
1, 1, 0, 0, 0, 0, ...
0, 1, 1, 0, 0, 0, ...
0, 1, 1, 1, 0, 0, ...
0, 1, 1, 1, 1, 0, ...
0, 1, 1, 1, 1, 1, ...
(End)
Sum_{k=0..n} T(n,k) = Sum_{j=0..n} A000108(j) = A014137(n). - G. C. Greubel, Apr 30 2021

A323224 A(n, k) = [x^k] C^n*x/(1 - x) where C = 2/(1 + sqrt(1 - 4*x)), square array read by ascending antidiagonals with n >= 0 and k >= 0.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 4, 1, 0, 1, 4, 8, 9, 1, 0, 1, 5, 13, 22, 23, 1, 0, 1, 6, 19, 41, 64, 65, 1, 0, 1, 7, 26, 67, 131, 196, 197, 1, 0, 1, 8, 34, 101, 232, 428, 625, 626, 1, 0, 1, 9, 43, 144, 376, 804, 1429, 2055, 2056, 1
Offset: 0

Views

Author

Peter Luschny, Jan 24 2019

Keywords

Comments

Equals A096465 when the leading column (k = 0) is removed. - Georg Fischer, Jul 26 2023

Examples

			The square array starts:
   [n\k]  0  1   2   3    4     5     6      7       8       9
    ---------------------------------------------------------------
    [0]   0, 1,  1,  1,   1,    1,    1,     1,      1,      1, ... A057427
    [1]   0, 1,  2,  4,   9,   23,   65,   197,    626,   2056, ... A014137
    [2]   0, 1,  3,  8,  22,   64,  196,   625,   2055,   6917, ... A014138
    [3]   0, 1,  4, 13,  41,  131,  428,  1429,   4861,  16795, ... A001453
    [4]   0, 1,  5, 19,  67,  232,  804,  2806,   9878,  35072, ... A114277
    [5]   0, 1,  6, 26, 101,  376, 1377,  5017,  18277,  66727, ... A143955
    [6]   0, 1,  7, 34, 144,  573, 2211,  8399,  31655, 118865, ...
    [7]   0, 1,  8, 43, 197,  834, 3382, 13378,  52138, 201364, ...
    [8]   0, 1,  9, 53, 261, 1171, 4979, 20483,  82499, 327656, ...
    [9]   0, 1, 10, 64, 337, 1597, 7105, 30361, 126292, 515659, ...
.
Triangle given by ascending antidiagonals:
    0;
    0, 1;
    0, 1, 1;
    0, 1, 2,  1;
    0, 1, 3,  4,   1;
    0, 1, 4,  8,   9,   1;
    0, 1, 5, 13,  22,  23,   1;
    0, 1, 6, 19,  41,  64,  65,   1;
    0, 1, 7, 26,  67, 131, 196, 197,   1;
    0, 1, 8, 34, 101, 232, 428, 625, 626, 1;
.
The difference table of a column successively gives the preceding columns, here starting with column 6.
col(6) = 1, 65, 196, 428, 804, 1377, 2211, 3382, 4979, 7105, ...
col(5) =    64, 131, 232, 376,  573,  834, 1171, 1597, 2126, ...
col(4) =         67, 101, 144,  197,  261,  337,  426,  529, ...
col(3) =              34,  43,   53,   64,   76,   89,  103, ...
col(2) =                    9,   10,   11,   12,   13,   14, ...
col(1) =                          1,    1,    1,    1,    1, ...
col(0) =                                0,    0,    0,    0, ...
.
Example for the sum formula: C(0) = 1, C(1) = 1, C(2) = 2 and C(3) = 5.
X(3, 4) = {{0,0,0}, {0,0,1}, {0,1,0}, {1,0,0}, {0,0,2}, {0,1,1}, {0,2,0}, {1,0,1},
{1,1,0}, {2,0,0}, {0,0,3}, {0,1,2}, {0,2,1}, {0,3,0}, {1,0,2}, {1,1,1}, {1,2,0},
{2,0,1}, {2,1,0}, {3,0,0}}. T(3,4) = 1+1+1+1+2+1+2+1+1+2+5+2+2+5+2+1+2+2+2+5 = 41.
		

Crossrefs

The coefficients of the polynomials generating the columns are in A323233.
Sums of antidiagonals and row 1 are A014137. Main diagonal is A242798.
Rows: A057427 (n=0), A014137 (n=1), A014138 (n=2), A001453 (n=3), A114277 (n=4), A143955 (n=5).
Columns: A000027 (k=2), A034856 (k=3), A323221 (k=4), A323220 (k=5).
Similar array based on central binomials is A323222.
Cf. A096465.

Programs

  • Maple
    Row := proc(n, len) local C, ogf, ser; C := (1-sqrt(1-4*x))/(2*x);
    ogf := C^n*x/(1-x); ser := series(ogf, x, (n+1)*len+1);
    seq(coeff(ser, x, j), j=0..len) end:
    for n from 0 to 9 do Row(n, 9) od;
    # Alternatively by recurrence:
    B := proc(n, k) option remember; if n <= 0 or k < 0 then 0
    elif n = k then 1 else B(n-1, k) + B(n, k-1) fi end:
    A := (n, k) -> B(n + k, k): seq(lprint(seq(A(n, k), k=0..9)), n=0..9);
  • Mathematica
    (* Illustrating the sum formula, not efficient. *) T[0, K_] := Boole[K != 0];
    T[N_, K_] := Module[{}, r[n_, k_] := FrobeniusSolve[ConstantArray[1, n], k];
    X[n_] := Flatten[Table[r[N, j], {j, 0, n - 1}], 1];
    Sum[Product[CatalanNumber[m[[i]]], {i, 1, N}], {m , X[K]}]];
    Trow[n_] := Table[T[n, k], {k, 0, 9}]; Table[Trow[n], {n, 0, 9}]

Formula

For n>0 and k>0 let X(n, k) denote the set of all tuples of length n with elements from {0, ..., k-1} with sum < k. Let C(m) denote the m-th Catalan number. Then: A(n, k) = Sum_{(j1,...,jn) in X(n, k)} C(j1)*C(j2)*...*C(jn).
A(n, k) = T(n + k, k) with T(n, k) = T(n-1, k) + T(n, k-1) with T(n, k) = 0 if n <= 0 or k < 0 and T(n, n) = 1.
Showing 1-3 of 3 results.