login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238121 Triangle read by rows: T(n,k) gives the number of ballot sequences of length n having exactly k descents, n>=0, 0<=k<=n. 14
1, 1, 0, 2, 0, 0, 3, 1, 0, 0, 5, 5, 0, 0, 0, 7, 16, 3, 0, 0, 0, 11, 43, 21, 1, 0, 0, 0, 15, 99, 101, 17, 0, 0, 0, 0, 22, 215, 373, 145, 9, 0, 0, 0, 0, 30, 430, 1174, 836, 146, 4, 0, 0, 0, 0, 42, 834, 3337, 3846, 1324, 112, 1, 0, 0, 0, 0, 56, 1529, 8642, 15002, 8786, 1615, 66, 0, 0, 0, 0, 0, 77, 2765, 21148, 52132, 47013, 15403, 1582, 32, 0, 0, 0, 0, 0 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

Also number of standard Young tableaux such that there are k pairs of cells (v,v+1) with v+1 lying in a row above v.

Columns k=0-10 give: A000041, A241794, A241795, A241796, A241797, A241798, A241799, A241800, A241801, A241802, A241803.

T(2n,n) gives A241804.

T(2n+1,n) gives A241805.

Row sums are A000085.

T(n*(n+1)/2,n*(n-1)/2) = 1.

A238122 is another version with zeros omitted.

LINKS

Joerg Arndt and Alois P. Heinz, Rows n = 0..45, flattened

EXAMPLE

Triangle starts:

1,

1, 0,

2, 0, 0,

3, 1, 0, 0,

5, 5, 0, 0, 0,

7, 16, 3, 0, 0, 0,

11, 43, 21, 1, 0, 0, 0,

15, 99, 101, 17, 0, 0, 0, 0,

22, 215, 373, 145, 9, 0, 0, 0, 0,

30, 430, 1174, 836, 146, 4, 0, 0, 0, 0,

42, 834, 3337, 3846, 1324, 112, 1, 0, 0, 0, 0,

56, 1529, 8642, 15002, 8786, 1615, 66, 0, 0, 0, 0, 0,

77, 2765, 21148, 52132, 47013, 15403, 1582, 32, 0, 0, 0, 0, 0,

101, 4792, 48713, 164576, 214997, 112106, 21895, 1310, 14, 0, 0, 0, 0, 0,

...

The T(5,1) = 16 ballot sequences of length n=5 with k=1 descent are (dots for zeros):

01:  [ . . . 1 . ]

02:  [ . . 1 . . ]

03:  [ . . 1 . 1 ]

04:  [ . . 1 . 2 ]

05:  [ . . 1 1 . ]

06:  [ . . 1 2 . ]

07:  [ . . 1 2 1 ]

08:  [ . 1 . . . ]

09:  [ . 1 . . 1 ]

10:  [ . 1 . . 2 ]

11:  [ . 1 . 1 2 ]

12:  [ . 1 . 2 3 ]

13:  [ . 1 2 . . ]

14:  [ . 1 2 . 1 ]

15:  [ . 1 2 . 3 ]

16:  [ . 1 2 3 . ]

MAPLE

b:= proc(n, v, l) option remember; `if`(n<1, 1, expand(

      add(`if`(i=1 or l[i-1]>l[i], `if`(i<v, x, 1)*

      b(n-1, i, subsop(i=l[i]+1, l)), 0), i=1..nops(l))+

      b(n-1, nops(l)+1, [l[], 1])))

    end:

T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n-1, 1, [1])):

seq(T(n), n=0..14);

MATHEMATICA

b[n_, v_, l_] := b[n, v, l] = If[n<1, 1, Sum[If[i == 1 || l[[i-1]] > l[[i]], If[i<v, x, 1]*b[n-1, i, ReplacePart[l, i -> l[[i]]+1]], 0], {i, 1, Length[l]}] + b[n-1, Length[l]+1, Append[l, 1]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, n}]][b[n-1, 1, {1}]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-Fran├žois Alcover, Jan 06 2015, translated from Maple *)

CROSSREFS

Sequence in context: A259479 A238343 A238128 * A171380 A170980 A029301

Adjacent sequences:  A238118 A238119 A238120 * A238122 A238123 A238124

KEYWORD

nonn,tabl

AUTHOR

Joerg Arndt and Alois P. Heinz, Feb 21 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified April 24 00:59 EDT 2017. Contains 285338 sequences.