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-10 of 13 results. Next

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.

Original entry on oeis.org

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
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 21 2014

Keywords

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.
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.

Examples

			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 . ]
		

Programs

  • 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 (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 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 *)

A241794 Number of ballot sequences of length n having exactly one descent.

Original entry on oeis.org

1, 5, 16, 43, 99, 215, 430, 834, 1529, 2765, 4792, 8216, 13684, 22575, 36402, 58285, 91617, 143097, 220317, 337100, 509718, 766655, 1141457, 1690994, 2484138, 3631902, 5271297, 7617750, 10937657, 15640771, 22240250, 31502316, 44396662, 62345539, 87149572
Offset: 3

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 28 2014

Keywords

Examples

			a(3) = 1: [1,2,1].
a(4) = 5: [1,1,2,1], [1,2,1,1], [1,2,1,2], [1,2,1,3], [1,2,3,1].
		

Crossrefs

Column k=1 of A238121 and of A238122.

A241795 Number of ballot sequences of length n having exactly two descents.

Original entry on oeis.org

3, 21, 101, 373, 1174, 3337, 8642, 21148, 48713, 108147, 229984, 476430, 955667, 1879169, 3603751, 6801106, 12584048, 22974152, 41268291, 73301654, 128441712, 222871187, 382322022, 650209758, 1094918922, 1829777544, 3031447986, 4987910871, 8144753275
Offset: 5

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 28 2014

Keywords

Examples

			a(5) = 3: [1,2,1,2,1], [1,2,1,3,1], [1,2,1,3,2].
		

Crossrefs

Column k=2 of A238121 and of A238122.

A241796 Number of ballot sequences of length n having exactly three descents.

Original entry on oeis.org

1, 17, 145, 836, 3846, 15002, 52132, 164576, 484609, 1337597, 3521517, 8850458, 21485321, 50358968, 114911640, 255114977, 554333346, 1178070741, 2459840199, 5042845917, 10185374250, 20257833206, 39778823250, 77088115856, 147739793527, 279923493220
Offset: 6

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 28 2014

Keywords

Examples

			a(6) = 1: [1,2,1,3,2,1].
		

Crossrefs

Column k=3 of A238121 and of A238122.

A241797 Number of ballot sequences of length n having exactly four descents.

Original entry on oeis.org

9, 146, 1324, 8786, 47013, 214997, 874413, 3228005, 11049817, 35389760, 107476721, 310853113, 863984856, 2313084483, 6003120701, 15122836712, 37154716734, 89093938147, 209258012995, 481663102867, 1089445474512, 2422311605452, 5305675093522, 11451261202545
Offset: 8

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 28 2014

Keywords

Examples

			a(8) = 9: [1,2,1,2,1,3,2,1], [1,2,1,3,1,4,2,1], [1,2,1,3,2,1,2,1], [1,2,1,3,2,1,3,1], [1,2,1,3,2,1,3,2], [1,2,1,3,2,1,4,1], [1,2,1,3,2,1,4,2], [1,2,1,3,2,1,4,3], [1,2,1,3,2,4,3,1].
		

Crossrefs

Column k=4 of A238121 and of A238122.

A241798 Number of ballot sequences of length n having exactly five descents.

Original entry on oeis.org

4, 112, 1615, 15403, 112106, 672015, 3477691, 16037089, 67235292, 260887532, 946435074, 3246205986, 10587385911, 33085654876, 99411959668, 288773319190, 812777159786, 2225529375130, 5937743304924, 15483111029378, 39503358108034, 98849770060367, 242801184657314
Offset: 9

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 28 2014

Keywords

Examples

			a(9) = 4: [1,2,1,3,2,1,3,2,1], [1,2,1,3,2,1,4,2,1], [1,2,1,3,2,1,4,3,1], [1,2,1,3,2,1,4,3,2].
		

Crossrefs

Column k=5 of A238121 and of A238122.

A241799 Number of ballot sequences of length n having exactly six descents.

Original entry on oeis.org

1, 66, 1582, 21895, 215849, 1685957, 11051141, 63115364, 322683730, 1503863212, 6488505684, 26177296409, 99733640537, 361023920432, 1250117445742, 4157235614630, 13341716405949, 41433896651428, 124970671492315, 366791960890982, 1050487889623924
Offset: 10

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 28 2014

Keywords

Examples

			a(10) = 1: [1,2,1,3,2,1,4,3,2,1].
		

Crossrefs

Column k=6 of A238121 and of A238122.

A241800 Number of ballot sequences of length n having exactly seven descents.

Original entry on oeis.org

32, 1310, 26159, 349021, 3537427, 29216728, 205795528, 1274811402, 7106683612, 36230838069, 171229815244, 757346853197, 3162754360421, 12546713825786, 47572219652564, 173111049909503, 607264725020735, 2059610656640095, 6776341942347065, 21674530092011291
Offset: 12

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 28 2014

Keywords

Crossrefs

Column k=7 of A238121 and of A238122.

A241801 Number of ballot sequences of length n having exactly eight descents.

Original entry on oeis.org

14, 932, 26865, 486170, 6385041, 66251021, 572940736, 4284412169, 28422470746, 170581304048, 939549814317, 4806572652156, 23042550110214, 104344981470162, 448963898693786, 1845829609158989, 7281093726825326, 27670464821261399, 101613723592257039
Offset: 13

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 28 2014

Keywords

Examples

			a(13) = 14: [1,2,1,3,2,1,3,2,1,4,3,2,1], [1,2,1,3,2,1,4,2,1,5,3,2,1], [1,2,1,3,2,1,4,3,1,5,4,2,1], [1,2,1,3,2,1,4,3,2,1,3,2,1], [1,2,1,3,2,1,4,3,2,1,4,2,1], [1,2,1,3,2,1,4,3,2,1,4,3,1], [1,2,1,3,2,1,4,3,2,1,4,3,2], [1,2,1,3,2,1,4,3,2,1,5,2,1], [1,2,1,3,2,1,4,3,2,1,5,3,1], [1,2,1,3,2,1,4,3,2,1,5,3,2], [1,2,1,3,2,1,4,3,2,1,5,4,1], [1,2,1,3,2,1,4,3,2,1,5,4,2], [1,2,1,3,2,1,4,3,2,1,5,4,3], [1,2,1,3,2,1,4,3,2,5,4,3,1].
		

Crossrefs

Column k=8 of A238121 and of A238122.

A241802 Number of ballot sequences of length n having exactly nine descents.

Original entry on oeis.org

5, 555, 24060, 595052, 10131071, 131722015, 1394425753, 12538397433, 98654859370, 694083988620, 4440550793116, 26165677158969, 143525057166497, 738895115800678, 3596200018311737, 16639581043371855, 73574528888085621, 312133508358624077, 1275409396131467499
Offset: 14

Views

Author

Joerg Arndt and Alois P. Heinz, Apr 28 2014

Keywords

Examples

			a(14) = 5: [1,2,1,3,2,1,4,3,2,1,4,3,2,1], [1,2,1,3,2,1,4,3,2,1,5,3,2,1], [1,2,1,3,2,1,4,3,2,1,5,4,2,1], [1,2,1,3,2,1,4,3,2,1,5,4,3,1], [1,2,1,3,2,1,4,3,2,1,5,4,3,2].
		

Crossrefs

Column k=9 of A238121 and of A238122.
Showing 1-10 of 13 results. Next