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 31-40 of 79 results. Next

A126983 Expansion of 1/(1+x*c(x)), c(x) the g.f. of Catalan numbers A000108.

Original entry on oeis.org

1, -1, 0, -1, -2, -6, -18, -57, -186, -622, -2120, -7338, -25724, -91144, -325878, -1174281, -4260282, -15548694, -57048048, -210295326, -778483932, -2892818244, -10786724388, -40347919626, -151355847012, -569274150156
Offset: 0

Views

Author

Philippe Deléham, Mar 21 2007

Keywords

Comments

Hankel transform is (-1)^n.
Catalan transform of A033999. - R. J. Mathar, Nov 11 2008

Crossrefs

Programs

  • Magma
    [1] cat [(-1/2)^n*(1 +(&+[(-2)^k*Binomial(2*k,k)/(k+1): k in [0..n-1]])): n in [1..30]]; // G. C. Greubel, Feb 27 2019
    
  • Mathematica
    Table[(-1/2)^n*(1 + Sum[ CatalanNumber[k]*(-2)^k, {k, 0, n-1}]), {n, 0, 30}] (* G. C. Greubel, Feb 27 2019 *)
  • PARI
    {a(n) = (-1/2)^n*(1+sum(k=0,n-1, (-2)^k*binomial(2*k,k)/(k+1)))};
    vector(30, n, n--; a(n)) \\ G. C. Greubel, Feb 27 2019
    
  • Python
    from itertools import count, islice
    def A126983_gen(): # generator of terms
        yield from (1, -1, 0)
        a, c = 0, 1
        for n in count(1):
            yield (a:=-a-(c:=c*((n<<2)+2)//(n+2))>>1)
    A126983_list = list(islice(A126983_gen(),20)) # Chai Wah Wu, Apr 27 2023
  • Sage
    [1] + [(-1/2)^n*(1 +sum((-2)^k*catalan_number(k) for k in (0..n-1))) for n in (1..30)] # G. C. Greubel, Feb 27 2019
    

Formula

a(n) = (-1)^n*A064310(n).
a(n) = Sum_{k=0..n} A039599(n,k)*(-2)^k.
From Philippe Deléham, Nov 15 2009: (Start)
a(n) = Sum_{k=0..n} A106566(n,k)*(-1)^k, a(0)=1.
a(n) = -A000957(n) for n>0. (End)
Recurrence: 2*(n+2)*a(n+2) = (7*n+2)*a(n+1) + 2*(2*n+1)*a(n). - Fung Lam, May 07 2014
a(n) ~ -2^(2n)/sqrt(Pi*n^3)/9. - Fung Lam, May 07 2014

A237770 Number of standard Young tableaux with n cells without a succession v, v+1 in a row.

Original entry on oeis.org

1, 1, 1, 2, 4, 9, 22, 59, 170, 516, 1658, 5583, 19683, 72162, 274796, 1082439, 4406706, 18484332, 79818616, 353995743, 1611041726, 7510754022, 35842380314, 174850257639, 871343536591, 4430997592209, 22978251206350, 121410382810005, 653225968918521
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 13 2014

Keywords

Comments

A standard Young tableau (SYT) without a succession v, v+1 in a row is called a nonconsecutive tableau.
Also the number of ballot sequences without two consecutive elements equal. A ballot sequence B is a string such that, for all prefixes P of B, h(i)>=h(j) for iA000085).
First column (k=0) of A238125.

Examples

			The a(5) = 9 such tableaux of 5 are:
[1]   [2]  [3]   [4]  [5]  [6]  [7]  [8]  [9]
135   13   135   13   13   14   14   15   1
24    24   2     25   2    25   2    2    2
      5    4     4    4    3    3    3    3
                      5         5    4    4
                                          5
The corresponding ballot sequences are:
1:  [ 0 1 0 1 0 ]
2:  [ 0 1 0 1 2 ]
3:  [ 0 1 0 2 0 ]
4:  [ 0 1 0 2 1 ]
5:  [ 0 1 0 2 3 ]
6:  [ 0 1 2 0 1 ]
7:  [ 0 1 2 0 3 ]
8:  [ 0 1 2 3 0 ]
9:  [ 0 1 2 3 4 ]
		

Crossrefs

Cf. A000085 (all Young tableaux), A000957, A001181, A214021, A214087, A214159, A214875.
Cf. A238126 (tableaux with one succession), A238127 (two successions).

Programs

  • Maple
    h:= proc(l, j) option remember; `if`(l=[], 1,
          `if`(l[1]=0, h(subsop(1=[][], l), j-1), add(
          `if`(i<>j and l[i]>0 and (i=1 or l[i]>l[i-1]),
           h(subsop(i=l[i]-1, l), i), 0), i=1..nops(l))))
        end:
    g:= proc(n, i, l) `if`(n=0 or i=1, h([1$n, l[]], 0),
          `if`(i<1, 0, g(n, i-1, l)+
          `if`(i>n, 0, g(n-i, i, [i, l[]]))))
        end:
    a:= n-> g(n, n, []):
    seq(a(n), n=0..30);
    # second Maple program (counting ballot sequences):
    b:= proc(n, v, l) option remember;
          `if`(n<1, 1, add(`if`(i<>v and (i=1 or l[i-1]>l[i]),
           b(n-1, i, subsop(i=l[i]+1, l)), 0), i=1..nops(l))+
           b(n-1, nops(l)+1, [l[], 1]))
        end:
    a:= proc(n) option remember; forget(b); b(n-1, 1, [1]) end:
    seq(a(n), n=0..30);
  • Mathematica
    b[n_, v_, l_List] := b[n, v, l] = If[n<1, 1, Sum[If[i != v && (i == 1 || l[[i-1]] > l[[i]]), b[n-1, i, ReplacePart[l, i -> l[[i]]+1]], 0], {i, 1, Length[l]}] + b[n-1, Length[l]+1, Append[l, 1]]]; a[n_] := a[n] = b[n-1, 1, {1}]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 06 2015, translated from 2nd Maple program *)

Formula

a(n) = Sum_{k=1..A264078(n)} k * A264051(n,k). - Alois P. Heinz, Nov 02 2015

A001558 Number of hill-free Dyck paths of semilength n+3 and having length of first descent equal to 1 (a hill in a Dyck path is a peak at level 1).

Original entry on oeis.org

1, 3, 10, 33, 111, 379, 1312, 4596, 16266, 58082, 209010, 757259, 2760123, 10114131, 37239072, 137698584, 511140558, 1904038986, 7115422212, 26668376994, 100221202998, 377570383518, 1425706128480, 5394898197448, 20454676622476
Offset: 0

Views

Author

Keywords

Comments

a(n) is also the number of even-length descents to ground level in all Dyck paths of semilength n+2. Example: a(1)=3 because in UDUDUD, UDUU(DD), UU(DD)UD, UUDU(DD) and UUUDDD we have 3 even-length descents to ground level (shown between parentheses). - Emeric Deutsch, Oct 05 2008
Convolution of A000108 with A104629. - Philippe Deléham, Nov 11 2009
The Kn12 triangle sums of A039599 are given by the terms of this sequence. For the definition of this and other triangle sums see A180662. - Johannes W. Meijer, Apr 20 2011

Examples

			a(1)=3 because we have uu(d)ududd, uuu(d)uddd and uu(d)uuddd, where u=(1,1), d=(1,-1) (the first descents are shown between parentheses).
G.f. = 1 + 3*x + 10*x^2 + 33*x^3 + 111*x^4 + 379*x^5 + 1312*x^6 + ...
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A111301. - Emeric Deutsch, Oct 05 2008

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!( (1-Sqrt(1-4*x))/(x*(3-Sqrt(1-4*x)))*((1-Sqrt(1-4*x))/(2*x))^3 )); // G. C. Greubel, Feb 12 2019
    
  • Maple
    F:=(1-sqrt(1-4*z))/z/(3-sqrt(1-4*z)): C:=(1-sqrt(1-4*z))/2/z: g:=F*C^3: gser:=series(g,z=0,32): seq(coeff(gser,z,n),n=0..27); # Emeric Deutsch, May 08 2006
  • Mathematica
    CoefficientList[Series[(1-Sqrt[1-4*x])/(x*(3-Sqrt[1-4*x]))*((1-Sqrt[1-4*x])/(2*x))^3, {x, 0, 30}], x] (* Vaclav Kotesovec, Mar 20 2014 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-sqrt(1-4*x))/(x*(3-sqrt(1-4*x)))*((1-sqrt(1-4*x))/(2*x))^3) \\ G. C. Greubel, Feb 12 2019
    
  • Sage
    ((1-sqrt(1-4*x))/(x*(3-sqrt(1-4*x)))*((1-sqrt(1-4*x))/(2*x))^3).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 12 2019

Formula

a(n) = A000957(n+4) - A000957(n+3) - A000957(n+2) (A000957 are the Fine numbers). - Emeric Deutsch, May 08 2006
a(n) = A118972(n+3,1). - Emeric Deutsch, May 08 2006
G.f.: F*C^3, where F = (1-sqrt(1-4z))/(z*(3-sqrt(1-4z))) and C = (1-sqrt(1-4z))/(2z) is the Catalan function. - Emeric Deutsch, May 08 2006
a(n) = Sum_{k>=0} k*A111301(n+2,k). - Emeric Deutsch, Oct 05 2008
(n+3)*a(n) = (-(11/2)*n + 21/2)*a(n-3) + ((9/2)*n + 11/2)*a(n-1) + (-(1/2)*n + 9/2)*a(n-2) + (-2n + 5)*a(n-4). - Simon Plouffe, Feb 09 2012
a(n) ~ 11*2^(2*n+4)/(9*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Mar 20 2014

Extensions

Edited by Emeric Deutsch, May 08 2006

A214021 Number A(n,k) of n X k nonconsecutive tableaux; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 2, 1, 1, 1, 0, 1, 6, 6, 1, 1, 1, 0, 1, 22, 72, 18, 1, 1, 1, 0, 1, 92, 1289, 960, 57, 1, 1, 1, 0, 1, 422, 29889, 93964, 14257, 186, 1, 1, 1, 0, 1, 2074, 831174, 13652068, 8203915, 228738, 622, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Jul 01 2012

Keywords

Comments

A standard Young tableau (SYT) where entries i and i+1 never appear in the same row is called a nonconsecutive tableau.

Examples

			A(2,4) = 1:
  [1 3 5 7]
  [2 4 6 8].
A(4,2) = 6:
  [1, 5]   [1, 4]   [1, 3]   [1, 4]   [1, 3]   [1, 3]
  [2, 6]   [2, 6]   [2, 6]   [2, 5]   [2, 5]   [2, 4]
  [3, 7]   [3, 7]   [4, 7]   [3, 7]   [4, 7]   [5, 7]
  [4, 8]   [5, 8]   [5, 8]   [6, 8]   [6, 8]   [6, 8].
Square array A(n,k) begins:
  1, 1,  1,     1,       1,          1,              1, ...
  1, 1,  0,     0,       0,          0,              0, ...
  1, 1,  1,     1,       1,          1,              1, ...
  1, 1,  2,     6,      22,         92,            422, ...
  1, 1,  6,    72,    1289,      29889,         831174, ...
  1, 1, 18,   960,   93964,   13652068,     2621897048, ...
  1, 1, 57, 14257, 8203915, 8134044455, 11865331748843, ...
		

Crossrefs

Rows n=0+2, 3-4 give: A000012, A001181(k) for k>0, A214875.
Columns k=0+1, 2, 3 give: A000012, A000957(n+1), A214159.
Main diagonal gives A264103.

Programs

  • Maple
    b:= proc(l, t) option remember; local n, s; n, s:= nops(l),
           add(i, i=l); `if`(s=0, 1, add(`if`(t<>i and l[i]>
          `if`(i=n, 0, l[i+1]), b(subsop(i=l[i]-1, l), i), 0), i=1..n))
        end:
    A:= (n, k)-> `if`(n<1 or k<1, 1, b([k$n], 0)):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[l_, t_] := b[l, t] = Module[{n, s}, {n, s} = {Length[l], Sum[i, {i, l}]}; If[s == 0, 1, Sum[If[t != i && l[[i]] > If[i == n, 0, l[[i+1]]], b[ReplacePart[l, i -> l[[i]]-1], i], 0], {i, 1, n}]] ] ; a[n_, k_] := If[n < 1 || k < 1, 1, b[Array[k&, n], 0]]; Table[Table[a[n, d - n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Dec 09 2013, translated from Maple *)

A065601 Number of Dyck paths of length 2n with exactly 1 hill.

Original entry on oeis.org

0, 1, 0, 2, 4, 13, 40, 130, 432, 1466, 5056, 17672, 62460, 222853, 801592, 2903626, 10582816, 38781310, 142805056, 528134764, 1960825672, 7305767602, 27307800400, 102371942932, 384806950624, 1450038737668, 5476570993440, 20727983587220, 78606637060012
Offset: 0

Views

Author

N. J. A. Sloane, Dec 02 2001

Keywords

Comments

Convolution of A000957(n) with itself gives a(n-1).

Crossrefs

2nd column of A065600. Cf. A000957.

Programs

  • Maple
    b:= proc(x, y, h, z) option remember;
         `if`(x<0 or y b(n$2, true$2):
    seq(a(n), n=0..30);  # Alois P. Heinz, May 10 2012
    # second Maple program:
    series(((1-sqrt(1-4*x))/(3-sqrt(1-4*x)))^2/x, x=0, 30);  # Mark van Hoeij, Apr 18 2013
  • Mathematica
    CoefficientList[Series[((1-Sqrt[1-4*x])/(3-Sqrt[1-4*x]))^2/x, {x, 0, 20}], x] (* Vaclav Kotesovec, Feb 12 2014 *)
    Table[Sum[(-1)^j*(j+1)*(j+2)*Binomial[2*n-1-j,n],{j,0,n-1}]/(n+1),{n,0,30}] (* Vaclav Kotesovec, May 18 2015 *)

Formula

Reference gives g.f.'s.
Conjecture: 2*(n+1)*a(n) +(-3*n+2)*a(n-1) +2*(-9*n+19)*a(n-2) +4*(-2*n+3)*a(n-3)=0. - R. J. Mathar, Dec 10 2013
a(n) ~ 2^(2*n+3) / (27 * sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Feb 12 2014

Extensions

More terms from Emeric Deutsch, Dec 03 2001

A104629 Expansion of (1-2*x-sqrt(1-4*x))/(x^2 * (1+2*x+sqrt(1-4*x))).

Original entry on oeis.org

1, 2, 6, 18, 57, 186, 622, 2120, 7338, 25724, 91144, 325878, 1174281, 4260282, 15548694, 57048048, 210295326, 778483932, 2892818244, 10786724388, 40347919626, 151355847012, 569274150156, 2146336125648, 8110508473252
Offset: 0

Views

Author

Paul Barry, Mar 17 2005

Keywords

Comments

Diagonal sums of A039598.

Crossrefs

Partial sums of A122920.

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!((1-2*x-Sqrt(1-4*x))/(x^2*(1+2*x+Sqrt(1-4*x))))); // G. C. Greubel, Aug 12 2018
    
  • Mathematica
    CoefficientList[Series[((1-2x-Sqrt[1-4x])/(1+2x+Sqrt[1-4x]))/x^2,{x,0,30}],x] (* Harvey P. Dale, Jul 23 2016 *)
    Table[(1 + Sum[CatalanNumber[n]*(-2)^k, {k,0,n+2}])/(8*(-2)^n), {n,0,30}] (* G. C. Greubel, Aug 12 2018 *)
  • PARI
    x='x+O('x^30); Vec((1-2*x-sqrt(1-4*x))/(x^2*(1+2*x+sqrt(1-4*x)))) \\ G. C. Greubel, Aug 12 2018
    
  • PARI
    for(n=0,30, print1((1 + sum(k=0,n+2, (-2)^k*binomial(2*k, k)/(k+1)))/(8*(-2)^n), ", ")) \\ G. C. Greubel, Aug 12 2018
    
  • Python
    from itertools import count, islice
    def A104629_gen(): # generator of terms
        a, c = 0, 1
        for n in count(1):
            yield (a:=(c:=c*((n<<2)+2)//(n+2))-a>>1)
    A104629_list = list(islice(A104629_gen(),20)) # Chai Wah Wu, Apr 26 2023

Formula

a(n) = A000957(n+3).
a(n) = (1 + Sum_{k=0..n+2} C(k)*(-2)^k)/(8*(-2)^n), where C(n) = Catalan numbers.
D-finite with recurrence: 2*(n+3)*a(n) +(-7*n-9)*a(n-1) +2*(-2*n-3)*a(n-2)=0. - R. J. Mathar, Oct 30 2014 [Verified by Georg Fischer, Apr 27 2023]

A158815 Triangle T(n,k) read by rows, matrix product of A046899(row-reversed) * A130595.

Original entry on oeis.org

1, 1, 1, 4, 1, 1, 13, 5, 1, 1, 46, 16, 6, 1, 1, 166, 58, 19, 7, 1, 1, 610, 211, 71, 22, 8, 1, 1, 2269, 781, 261, 85, 25, 9, 1, 1, 8518, 2920, 976, 316, 100, 28, 10, 1, 1, 32206, 11006, 3676, 1196, 376, 116, 31, 11, 1, 1
Offset: 0

Views

Author

Gary W. Adamson and Roger L. Bagula, Mar 27 2009

Keywords

Comments

The left factor of the matrix product is the triangle which starts
1;
2, 1;
6, 3, 1;
20, 10, 4, 1;
a row-reversed version of A046899, equivalent to the triangular view of the array A092392. The right factor is the inverse of the matrix A007318, which is A130595.
Swapping the two factors, A007318^(-1) * A046899(row-reversed) would generate A158793.
Riordan array (f(x), g(x)) where f(x) is the g.f. of A026641 and where g(x) is the g.f. of A000957. - Philippe Deléham, Dec 05 2009
T(n,k) is the number of nonnegative paths consisting of upsteps U=(1,1) and downsteps D=(1,-1) of length 2n with k low peaks. (A low peak has its peak vertex at height 1.) Example: T(3,1)=5 counts UDUUUU, UDUUUD, UDUUDU, UDUUDD, UUDDUD. - David Callan, Nov 21 2011
Matrix product P^2 * Q * P^(-2), where P denotes Pascal's triangle A007318 and Q denotes A061554 (formed from P by sorting the rows into descending order). Cf. A158793 and A171243. - Peter Bala, Jul 13 2021

Examples

			The triangle starts
       1;
       1,     1;
       4,     1,     1;
      13,     5,     1,    1;
      46,    16,     6,    1,    1;
     166,    58,    19,    7,    1,   1;
     610,   211,    71,   22,    8,   1,   1;
    2269,   781,   261,   85,   25,   9,   1,  1;
    8518,  2620,   976,  316,  100,  28,  10,  1,  1;
   32206, 11006,  3676, 1196,  376, 116,  31, 11,  1, 1;
  122464, 41746, 13938, 4544, 1442, 441, 133, 34, 12, 1, 1;
  ...
		

Crossrefs

Programs

  • Maple
    A158815 := proc (n, k)
      add((-1)^(j+k)*binomial(2*n-j, n)*binomial(j, k), j = 0..n);
    end proc:
    seq(seq(A158815(n, k), k = 0..n), n = 0..10); # Peter Bala, Jul 13 2021
  • Mathematica
    T[n_,k_]:= T[n,k]= Sum[(-1)^(j+k)*Binomial[j,k]*Binomial[2*n-j,n], {j,0,n}];
    Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 22 2021 *)
  • Sage
    def A158815(n,k): return sum( (-1)^(j+k)*binomial(2*n-j, n)*binomial(j, k) for j in (0..n) )
    flatten([[A158815(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Dec 22 2021

Formula

Sum_{k=0..n} T(n,k) = A046899(n).
T(n,0) = A026641(n).
Sum_{k=0..n} T(n,k)*x^k = A026641(n), A000984(n), A001700(n), A000302(n) for x = 0, 1, 2, 3 respectively. - Philippe Deléham, Dec 03 2009
T(n, k) = Sum_{j=0..n} binomial(j, k)*binomial(2*n-j, n). - Peter Bala, Jul 13 2021

A059019 Number of Dyck paths of semilength n with no peak at height 3.

Original entry on oeis.org

1, 1, 2, 4, 9, 22, 58, 163, 483, 1494, 4783, 15740, 52956, 181391, 630533, 2218761, 7888266, 28291588, 102237141, 371884771, 1360527143, 5002837936, 18479695171, 68539149518, 255137783916, 952914971191, 3569834343547, 13410481705795
Offset: 0

Views

Author

N. J. A. Sloane, Feb 12 2001

Keywords

Comments

From Gary W. Adamson, Jul 11 2011: (Start)
a(n) is the upper left term in M^n, where M is an infinite square production matrix in which a column of (1,1,0,0,0,...) is prepended to an infinite lower triangular matrix of all 1's and the rest zeros, as follows:
1, 1, 0, 0, 0, 0, ...
1, 1, 1, 0, 0, 0, ...
0, 1, 1, 1, 0, 0, ...
0, 1, 1, 1, 1, 0, ...
0, 1, 1, 1, 1, 1, ...
... (End)

Examples

			1 + x + 2*x^2 + 4*x^3 + 9*x^4 + 22*x^5 + 58*x^6 + ...
		

Crossrefs

G_1, G_2, G_3, G_4 give A000957, A000108, A059019, A059027, respectively.

Programs

  • Maple
    A059019:=n->add(add(binomial(k,j)*j*binomial(2*n-2*k-j-1,n-k-j)/(n-k),j=0..min(k,n-k)), k=1..n-1)+1: seq(A059019(n),n=0..30); # Wesley Ivan Hurt, Oct 01 2014
  • Mathematica
    CoefficientList[Series[2/(2-3*x+x*Sqrt[1-4*x]), {x, 0, 20}], x]
  • Maxima
    a(n):=sum(sum(binomial(k,j)*j*binomial(2*n-2*k-j-1,n-k-j),j,0,min(k,n-k))/(n-k),k,1,n-1)+1; \\ Vladimir Kruchinin, Oct 02 2013
    
  • PARI
    x='x+O('x^66); Vec( 2/(2-3*x+x*(1-4*x)^(1/2)) ) \\ Joerg Arndt, Oct 02 2013

Formula

G.f.: 2/(2 - 3*x + x*(1-4*x)^(1/2)).
a(n) = Sum_{k=1..n-1} (Sum_{j=0..min(k,n-k)} binomial(k,j)*j*binomial(2*n-2*k-j-1, n-k-j) /(n-k)) + 1. - Vladimir Kruchinin, Oct 02 2013
a(n) ~ 2^(2*n + 2)/(25*sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Dec 10 2013
a(n+1) - a(n) = A135337(n), n > 0. - Philippe Deléham, Oct 02 2014

A065602 Triangle T(n,k) giving number of hill-free Dyck paths of length 2n and having height of first peak equal to k.

Original entry on oeis.org

1, 1, 1, 3, 2, 1, 8, 6, 3, 1, 24, 18, 10, 4, 1, 75, 57, 33, 15, 5, 1, 243, 186, 111, 54, 21, 6, 1, 808, 622, 379, 193, 82, 28, 7, 1, 2742, 2120, 1312, 690, 311, 118, 36, 8, 1, 9458, 7338, 4596, 2476, 1164, 474, 163, 45, 9, 1, 33062, 25724, 16266, 8928, 4332, 1856, 692, 218, 55, 10, 1
Offset: 2

Views

Author

N. J. A. Sloane, Dec 02 2001

Keywords

Comments

A Riordan triangle.
Subtriangle of triangle in A167772. - Philippe Deléham, Nov 14 2009
Riordan array (f(x), x*g(x)) where f(x) is the g.f. of A000958 and g(x) is the g.f. of A000108. - Philippe Deléham, Jan 23 2010

Examples

			T(3,2)=1 reflecting the unique Dyck path (UUDUDD) of length 6, with no hills and height of first peak equal to 2.
Triangle begins:
     1;
     1,    1;
     3,    2,    1;
     8,    6,    3,   1;
    24,   18,   10,   4,   1;
    75,   57,   33,  15,   5,   1;
   243,  186,  111,  54,  21,   6,  1;
   808,  622,  379, 193,  82,  28,  7,  1;
  2742, 2120, 1312, 690, 311, 118, 36,  8,  1;
		

Crossrefs

Row sums give A000957 (the Fine sequence).
First column is A000958.

Programs

  • Haskell
    a065602 n k = sum
       [(k-1+2*j) * a007318' (2*n-k-1-2*j) (n-1) `div` (2*n-k-1-2*j) |
        j <- [0 .. div (n-k) 2]]
    a065602_row n = map (a065602 n) [2..n]
    a065602_tabl = map a065602_row [2..]
    -- Reinhard Zumkeller, May 15 2014
    
  • Maple
    a := proc(n,k) if n=0 and k=0 then 1 elif k<2 or k>n then 0 else sum((k-1+2*j)*binomial(2*n-k-1-2*j,n-1)/(2*n-k-1-2*j),j=0..floor((n-k)/2)) fi end: seq(seq(a(n,k),k=2..n),n=1..14);
  • Mathematica
    nmax = 12; t[n_, k_] := Sum[(k-1+2j)*Binomial[2n-k-1-2j, n-1] / (2n-k-1-2j), {j, 0, (n-k)/2}]; Flatten[ Table[t[n, k], {n, 2, nmax}, {k, 2, n}]] (* Jean-François Alcover, Nov 08 2011, after Maple *)
  • SageMath
    def T(n,k): return sum( (k+2*j-1)*binomial(2*n-2*j-k-1, n-1)/(2*n-2*j-k-1) for j in (0..(n-k)//2) )
    flatten([[T(n,k) for k in (2..n)] for n in (2..12)]) # G. C. Greubel, May 26 2022

Formula

T(n, 2) = A000958(n-1).
Sum_{k=2..n} T(n, k) = A000957(n+1).
From Emeric Deutsch, Feb 23 2004: (Start)
T(n, k) = Sum_{j=0..floor((n-k)/2)} (k-1+2*j)*binomial(2*n-k-1-2*j, n-1)/(2*n-k-1-2*j).
G.f.: t^2*z^2*C/( (1-z^2*C^2)*(1-t*z*C) ), where C = (1-sqrt(1-4*z))/(2*z) is the Catalan function. (End)
T(n,k) = A167772(n-1,k-1), k=2..n. - Reinhard Zumkeller, May 15 2014
From G. C. Greubel, May 26 2022: (Start)
T(n, n-1) = A000027(n-2).
T(n, n-2) = A000217(n-2).
T(n, n-3) = A166830(n-3). (End)

Extensions

More terms from Emeric Deutsch, Feb 23 2004

A114587 Number of peaks at odd levels in all hill-free Dyck paths of semilength n+3 (a hill in a Dyck path is a peak at level 1).

Original entry on oeis.org

1, 4, 17, 68, 269, 1056, 4132, 16144, 63046, 246228, 962019, 3760700, 14710589, 57581696, 225546488, 884059808, 3467476430, 13608852968, 53443415522, 210000136136, 825630208466, 3247733377664, 12781815016232, 50328168273408
Offset: 0

Views

Author

Emeric Deutsch, Dec 11 2005

Keywords

Examples

			a(1)=4 because in the 6 (=A000957(5)) hill-free Dyck paths of semilength 4, namely UUUUDDDD, UU(UD)(UD)DD, UUDU(UD)DD, UUDUDUDD, UU(UD)DUDD and UUDDUUDD (U=(1,1), D=(1,-1)) we have altogether 4 peaks at odd level (shown between parentheses).
		

Crossrefs

Programs

  • Maple
    G:=(1-2*z-3*z^2-2*z^3-(1-z^2)*sqrt(1-4*z))/2/sqrt(1-4*z)/z^4/(2+z)^2: Gser:=series(G,z=0,32): 1,seq(coeff(Gser,z^n),n=1..26);
  • Mathematica
    CoefficientList[Series[(1-2*x-3*x^2-2*x^3-(1-x^2)*Sqrt[1-4*x])/(2*x^4*(2+x)^2*Sqrt[1-4*x]), {x, 0, 20}], x] (* Vaclav Kotesovec, Oct 19 2012 *)

Formula

G.f.: (1 - 2*x - 3*x^2 - 2*x^3 - (1 - x^2)*sqrt(1 - 4*x))/(2*x^4*(2 + x)^2 * sqrt(1 - 4*x)).
a(n) = Sum_{k=0..n+1} k*A114586(n+3,k).
Recurrence: 8*n*(n+4)*a(n) = 2*(15*n^2 + 47*n + 18)*a(n-1) + (9*n^2 + 70*n + 80)*a(n-2) - 2*(n+1)*(2*n+1)*a(n-3). - Vaclav Kotesovec, Oct 19 2012
a(n) ~ 2^(2*n+6)/(9*sqrt(Pi*n)). - Vaclav Kotesovec, Oct 19 2012
Previous Showing 31-40 of 79 results. Next