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 21-26 of 26 results.

A064314 Total length of longest increasing runs in all permutations of n elements.

Original entry on oeis.org

1, 3, 12, 55, 299, 1900, 13942, 115932, 1078361, 11092265, 125040100, 1532995992, 20310212672, 289186696338, 4404156016584, 71441907922793, 1229835421590959, 22393298253477006, 430019590699868644, 8685717780508953928, 184088653170341473400, 4085097253151506682170
Offset: 1

Views

Author

David W. Wilson, Sep 07 2001

Keywords

Crossrefs

This sequence treats runs of adjacent elements, A003316 treats subsequences of not necessarily adjacent elements.

Programs

  • Maple
    b:= proc(u, o, t, k) option remember; `if`(t=k, (u+o)!,
          `if`(max(t, u)+o add(b(0, n, 0, k), k=1..n) -n*b(0, n, 0, n+1):
    seq(a(n), n=1..25);  # Alois P. Heinz, Oct 16 2013
  • Mathematica
    nn=30;f[list_]:=Total[Table[list[[i]]*i,{i,1,Length[list]}]];a[r_]:=Apply[Plus,Table[Normal[Series[y x^(r+1)/(1-Sum[y x^i,{i,1,r}]),{x,0,nn}]][[n]]/(n+r)!,{n,1,nn-r}]]/.y->-1;Map[f,Map[Select[#,#>0&]&,Transpose[Prepend[Table[Drop[Range[0,nn]! CoefficientList[Series[1/(1-x-a[n+1])-1/(1-x-a[n]),{x,0,nn}],x],1],{n,1,28}],Table[1,{nn}]]]]] (* Geoffrey Critzer, Feb 25 2014 *)

Formula

a(n) = Sum_{k=1..n} k*A008304(n,k). - Max Alekseyev, May 22 2012

A230234 Number of permutations of [n] in which the longest increasing run has length 8.

Original entry on oeis.org

1, 16, 231, 3322, 49236, 761904, 12372360, 211170960, 3788091451, 71356438043, 1409672722481, 29163603260677, 630867328411136, 14247689906846928, 335437110802718232, 8220763598490652440, 209435069840238717949, 5539287889970005834349, 151909981369978722092098
Offset: 8

Views

Author

Alois P. Heinz, Oct 12 2013

Keywords

Crossrefs

Column k=8 of A008304.

Programs

  • Maple
    b:= proc(u, o, t, k) option remember; `if`(u+o=0, 1,
          `if`(t b(n, 0, 0, 8)-b(n, 0, 0, 7):
    seq(a(n), n=8..30);

Formula

E.g.f.: 1/Sum_{n>=0} (9*n+1-x)*x^(9*n)/(9*n+1)! - 1/Sum_{n>=0} (8*n+1-x)*x^(8*n)/(8*n+1)!.
a(n) = A230231(n) - A230051(n).

A230235 Number of permutations of [n] in which the longest increasing run has length 9.

Original entry on oeis.org

1, 18, 287, 4512, 72540, 1209936, 21064680, 383685120, 7315701120, 145957544981, 3044416187213, 66312765615259, 1506481046115907, 35648661471454418, 877558860954150150, 22444760416001869200, 595702609788740888400, 16387438983202886695200
Offset: 9

Views

Author

Alois P. Heinz, Oct 12 2013

Keywords

Crossrefs

Column k=9 of A008304.

Programs

  • Maple
    b:= proc(u, o, t, k) option remember; `if`(u+o=0, 1,
          `if`(t b(n, 0, 0, 9)-b(n, 0, 0, 8):
    seq(a(n), n=9..30);

Formula

E.g.f.: 1/Sum_{n>=0} (10*n+1-x)*x^(10*n)/(10*n+1)! - 1/Sum_{n>=0} (9*n+1-x)*x^(9*n)/(9*n+1)!.
a(n) = A230232(n) - A230231(n).

A230236 Number of permutations of [n] in which the longest increasing run has length 10.

Original entry on oeis.org

1, 20, 349, 5954, 103194, 1845480, 34288800, 663848640, 13406178240, 282398538240, 6201593613645, 141859542537845, 3376683552323421, 83546513273754977, 2146303277645066980, 57187254952684274700, 1578640101972070456800, 45101111852055549981600
Offset: 10

Views

Author

Alois P. Heinz, Oct 12 2013

Keywords

Crossrefs

Column k=10 of A008304.

Programs

  • Maple
    b:= proc(u, o, t, k) option remember; `if`(u+o=0, 1,
          `if`(t b(n, 0, 0, 10)-b(n, 0, 0, 9):
    seq(a(n), n=10..30);

Formula

E.g.f.: 1/Sum_{n>=0} (11*n+1-x)*x^(11*n)/(11*n+1)! - 1/Sum_{n>=0} (10*n+1-x)*x^(10*n)/(10*n+1)!.
a(n) = A230233(n) - A230232(n).

A178249 Table T(n,k) counts the involutions of n with longest increasing contiguous subsequence of length k.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 6, 2, 1, 1, 14, 8, 2, 1, 1, 37, 27, 8, 2, 1, 1, 96, 94, 30, 8, 2, 1, 1, 270, 338, 114, 30, 8, 2, 1, 1, 777, 1237, 446, 118, 30, 8, 2, 1, 1, 2370, 4684, 1809, 473, 118, 30, 8, 2, 1, 1, 7450, 18142, 7502, 1964, 478, 118, 30, 8, 2, 1, 1, 24485, 72524, 32093, 8414, 1998, 478, 118, 30, 8, 2, 1
Offset: 1

Views

Author

Wouter Meeussen, Dec 20 2010

Keywords

Comments

Reverse of rows converges to 1,2,8,30,118,478,2004,8666,..

Examples

			T(4,2) = 6 because the 6 involutions with longest increasing contiguous subsequence lengths equal to 2 are: 1324, 1432, 2143, 3214, 3412, 4231.
Table starts:
1;
1,   1;
1,   2,   1;
1,   6,   2,   1;
1,  14,   8,   2,  1;
1,  37,  27,   8,  2, 1;
1,  96,  94,  30,  8, 2, 1;
1, 270, 338, 114, 30, 8, 2, 1;
		

Crossrefs

Cf. A008304; row sums are A000085; A047884 removes the contiguity requirement.

Programs

  • Mathematica
    (* first do *)
    Needs["Combinatorica`"]
    (* then *)
    maxISS[perm_List] := Max[0, (Max @@ (Length[#1]*Sign[First[#1]] & ) /@ Split[Sign[Rest[#1] - Drop[#1, -1]]] & )[perm]];classMaxISS[par_?PartitionQ]:=Count[ maxISS/@( TableauxToPermutation[FirstLexicographicTableau[par], #]&/@Tableaux[par]  ) ,#]&/@(-1+Range[ Tr[par] ]);
    Table[Apply[Plus,classMaxISS/@Partitions[n]],{n,2,6}];

Extensions

Definition corrected by Wouter Meeussen, Dec 22 2010

A258690 Total number of longest increasing runs in all permutations of [n].

Original entry on oeis.org

1, 1, 3, 8, 32, 167, 1096, 8117, 67859, 627649, 6394781, 71201812, 861677250, 11270215084, 158564826122, 2389093936957, 38396351412220, 655832914215010, 11865953978478454, 226724258401651143, 4562163514498852598, 96430112680094188086, 2136024671422363671272
Offset: 0

Views

Author

Alois P. Heinz, Jun 07 2015

Keywords

Comments

a(0) = 1 by convention.
a(n) >= n! = A000142(n).

Examples

			a(1) = 1: (1).
a(2) = 3: (12), (2)(1).
a(3) = 8: (123), (13)2, 2(13), (23)1, 3(12), (3)(2)(1).
		

Crossrefs

Programs

  • Maple
    b:= proc(u, o, l, m, c) option remember;  `if`(u+o=0, `if`(l>m, 1,
          `if`(lm, 1, `if`(l b(n, 0$4):
    seq(a(n), n=0..25);
  • Mathematica
    b[u_, o_, l_, m_, c_] := b[u, o, l, m, c] = If[u + o == 0, If[l > m, 1,
         If[l < m, c, c + 1]], Sum[b[u - j, o + j - 1, 1, Max[l, m],
         If[l > m, 1, If[l < m, c, c + 1]]], {j, 1, u}] +
               Sum[b[u+j-1, o-j, l+1, m, c], {j, 1, o}]];
    a[n_] :=  b[n, 0, 0, 0, 0];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Apr 15 2022, after Alois P. Heinz *)
Previous Showing 21-26 of 26 results.