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 106 results. Next

A116485 Number of permutations in S_n that avoid the pattern 12453 (or equivalently, 31245).

Original entry on oeis.org

1, 1, 2, 6, 24, 119, 694, 4581, 33286, 260927, 2174398, 19053058, 174094868, 1648198050, 16085475576, 161174636600, 1652590573612, 17292601075489, 184246699159418, 1995064785620557, 21919480341617102, 244015986016996763, 2749174129340156922, 31313478171012371344
Offset: 0

Views

Author

Zvezdelina Stankova (stankova(AT)mills.edu), Mar 19 2006

Keywords

Comments

a(n) is also the number of permutations in S_n that avoid the pattern 21453 or any of its symmetries. The Wilf class consists of 16 permutations. - David Bevan, Jun 17 2021

Crossrefs

Representatives for the 16 Wilf-equivalence patterns of length 5 are given in A116485, A047889, and A256195-A256208. - N. J. A. Sloane, Mar 19 2015

Programs

  • Mathematica
    avoid[n_, pat_] := Module[{p1 = pat[[1]], p2 = pat[[2]], p3 = pat[[3]], p4 = pat[[4]], p5 = pat[[5]], lseq = {}, i, p,
        lpat = Subsets[(n + 1) - Range[n], {Length[pat]}],
        psn = Permutations[Range[n]]},
       For[i = 1, i <= Length[lpat], i++,
        p = lpat[[i]];
        AppendTo[lseq, Select[psn, MemberQ[#, {_, p[[p1]], _, p[[p2]], _, p[[p3]], _, p[[p4]], _, p[[p5]], _}, {0}] &]];
        ]; n! - Length[Union[Flatten[lseq, 1]]]];
    Table[avoid[n, {1, 2, 4, 5, 3}], {n, 0, 8}]  (* Robert Price, Mar 27 2020 *)

Formula

Conjecture: a(n) + A158423(n) = n!. - Benedict W. J. Irwin, Mar 15 2016
The conjecture is true: All that is needed is to show that 23145 is Wilf-equivalent to 31245, but that’s obvious since they are inverses. - Doron Zeilberger and Yonah Biers-Ariel, Feb 26 2019
The exponential growth rate is 9+4*sqrt(2). See [Bona 2004]. - David Bevan, Jun 17 2021

Extensions

More terms from the Zvezdelina Stankova-Frenkel and Julian West paper. - N. J. A. Sloane, Mar 19 2015
More terms from Doron Zeilberger and Yonah Biers-Ariel, Feb 26 2019
More terms from Yonah Biers-Ariel, Mar 04 2019

A159139 Number of permutations of 1..n containing the relative rank sequence { 213465 } at any spacing.

Original entry on oeis.org

1, 37, 891, 18043, 337210, 6081686, 108469917, 1941309261, 35187952132, 649951312000, 12286366975723, 238445927000811, 4762398793018878, 98074791689121162, 2085684931155975120, 45859509146309390064, 1043533983233372354613, 24590543663448304800169
Offset: 6

Views

Author

R. H. Hardin, Apr 05 2009

Keywords

Comments

Same series for 654321 123456 564321 213456 123465 654312 456321 321456 123654 654123 345621 432156 126543 651234 564312 456312 321465 213654 564123 345612 432165 216543 561234 234561 543216 165432 612345 456123 321654.

Crossrefs

Programs

  • Maple
    h:= proc(l) local n; n:=nops(l); add(i, i=l)! /mul(mul(1+l[i]-j
          +add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)
        end:
    g:= proc(n, i, l)
          `if`(n=0 or i=1, h([l[], 1$n])^2, `if`(i<1, 0,
           add(g(n-i*j, i-1, [l[], i$j]), j=0..n/i)))
        end:
    a:= n-> n! -g(n, 5, []):
    seq(a(n), n=6..30);  # Alois P. Heinz, Jul 05 2012
    # second Maple program
    a:= proc(n) option remember; `if`(n<6, 0, `if`(n=6, 1,
         ((2475-4819*n^2-2985*n+175*n^4-1021*n^3+n^6+49*n^5)*a(n-1)
         -(35*n^4+441*n^3-845*n^2-4147*n-489)*(n-1)^2*a(n-2)
         +(-1668+329*n+259*n^2)*(n-1)^2*(n-2)^2*a(n-3)
         -225*(n-1)^2*(n-2)^2*(n-3)^2*a(n-4))/ ((n-6)*(n+6)^2*(n+4)^2)))
        end:
    seq(a(n), n=6..30);  # Alois P. Heinz, Sep 26 2012
  • Mathematica
    h[l_] := With[{n = Length[l]}, Sum[i, {i, l}]!/Product[Product[1+l[[i]] - j + Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}]];
    g[n_, i_, l_] := If[n == 0 || i === 1, h[Join[l, Array[1 &, n]]]^2, If[i < 1, 0, Sum[g[n - i*j, i - 1, Join[l, Array[i &, j]]], {j, 0, n/i}]]];
    a[n_] := n! - g[n, 5, {}];
    Table[a[n], {n, 6, 30}] (* Jean-François Alcover, Jun 19 2018, from first Maple program *)

Formula

a(n) = A214152(n,6) = A000142(n)-A047890(n) = A000142(n)-A214015(n,5). - Alois P. Heinz, Jul 05 2012

Extensions

More terms from Alois P. Heinz, Jul 05 2012

A159175 Number of permutations of 1..n containing the relative rank sequence { 1234567 } at any spacing.

Original entry on oeis.org

1, 50, 1578, 40884, 958809, 21353634, 463945294, 9996042284, 215831724525, 4702905606350, 103912444955422, 2336099774748540, 53567906041439136, 1255172323669315848, 30095426182382305848, 739238316780966277616, 18619024923770934306358, 481234428294016650524172
Offset: 7

Views

Author

R. H. Hardin Apr 05 2009

Keywords

Comments

Same series (among rank sequences with inversion = reversal) for 3214765 2134576.

Crossrefs

Programs

  • Maple
    h:= proc(l) local n; n:=nops(l); add(i, i=l)! /mul(mul(1+l[i]-j
          +add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)
        end:
    g:= (n, i, l)-> `if`(n=0 or i=1, h([l[], 1$n])^2, `if`(i<1, 0,
                     add(g(n-i*j, i-1, [l[], i$j]), j=0..n/i))):
    a:= n-> n! -g(n, 6, []):
    seq(a(n), n=7..25);  # Alois P. Heinz, Jul 05 2012
    # second Maple program
    a:= proc(n) option remember; `if`(n<7, 0, `if`(n=7, 1, ((-93464*n+1072*n^4
          +72128-125284*n^2+84*n^6+994*n^5-30491*n^3+n^7) *a(n-1)
          -4*(14*n^5+399*n^4+1124*n^3-7354*n^2-23983*n-5042)*(n-1)^2 *a(n-2)
          +4*(-7359-2629*n+1596*n^2+196*n^3)*(n-1)^2*(n-2)^2 *a(n-3)
          -1152*(1+2*n)*(n-1)^2*(n-2)^2*(n-3)^2 *a(n-4))/
           ((n-7)*(n+9)*(n+8)^2*(n+5)^2)))
        end:
    seq(a(n), n=7..30);  # Alois P. Heinz, Sep 27 2012
  • Mathematica
    h[l_] := With[{n = Length[l]}, Sum[i, {i, l}]!/Product[Product[1+l[[i]] - j + Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}]];
    g[n_, i_, l_] := If[n == 0 || i === 1, h[Join[l, Array[1 &, n]]]^2, If[i < 1, 0, Sum[g[n - i*j, i - 1, Join[l, Array[i &, j]]], {j, 0, n/i}]]];
    a[n_] := n! - g[n, 6, {}];
    Table[a[n], {n, 7, 25}] (* Jean-François Alcover, Jun 19 2018, from first Maple program *)

Formula

a(n) = A214152(n,7) = A000142(n)-A052399(n) = A000142(n)-A214015(n,6). - Alois P. Heinz, Jul 05 2012

Extensions

Extended beyond a(16) by Alois P. Heinz, Jul 05 2012

A159084 Number of permutations of 1..n containing the relative rank sequence { 124563 } at any spacing.

Original entry on oeis.org

1, 37, 892, 18103, 339346, 6140960, 109894287, 1972580175, 35835001869, 662818949341
Offset: 6

Views

Author

R. H. Hardin Apr 05 2009

Keywords

Comments

Same series for 365421 412356 653214 543621 234156 126345 651432 365412 412365 214563 563214 543612 234165 216345 561432

Crossrefs

A159085 Number of permutations of 1..n containing the relative rank sequence { 124653 } at any spacing.

Original entry on oeis.org

1, 37, 893, 18149, 340630, 6169385, 110446361, 1982469403, 36003022705, 665572282770
Offset: 6

Views

Author

R. H. Hardin Apr 05 2009

Keywords

Comments

Same series for 356421 421356 653124 453621 324156 126354 651423 356412 421365 214653 563124 453612 324165 216354 561423

Crossrefs

A159086 Number of permutations of 1..n containing the relative rank sequence { 125634 } at any spacing.

Original entry on oeis.org

1, 37, 892, 18102, 339278, 6138280, 109813241, 1970482132, 35785828571, 661740800536
Offset: 6

Views

Author

R. H. Hardin Apr 05 2009

Keywords

Comments

Same series for 436521 341256 652143 436512 341265 215634 562143

Crossrefs

A159087 Number of permutations of 1..n containing the relative rank sequence { 126435 } at any spacing.

Original entry on oeis.org

1, 37, 893, 18149, 340635, 6169711, 110458898, 1982842808, 36012586968, 665794484782
Offset: 6

Views

Author

R. H. Hardin Apr 05 2009

Keywords

Comments

Same series for 534621 243156 651342 364521 413256 125463 652314 364512 413265 215463 562314 534612 243165 216435 561342

Crossrefs

A159088 Number of permutations of 1..n containing the relative rank sequence { 126453 } at any spacing.

Original entry on oeis.org

1, 37, 892, 18099, 339095, 6131634, 109624680, 1965843921, 35681560273, 659532296861
Offset: 6

Views

Author

R. H. Hardin Apr 05 2009

Keywords

Comments

Same series for 354621 423156 651324 354612 423165 216453 561324

Crossrefs

A159089 Number of permutations of 1..n containing the relative rank sequence { 132465 } at any spacing.

Original entry on oeis.org

1, 37, 891, 18042, 337148, 6079368, 108401655, 1939557678, 35146756581, 649036979911
Offset: 6

Views

Author

R. H. Hardin Apr 05 2009

Keywords

Comments

Same series for 645321 132456 123546 654231 564231 213546 645312 456231 321546 132654 645123

Crossrefs

A159090 Number of permutations of 1..n containing the relative rank sequence { 132546 } at any spacing.

Original entry on oeis.org

1, 37, 891, 18041, 337085, 6076989, 108331202, 1937745128, 35104098525, 648090669839
Offset: 6

Views

Author

R. H. Hardin Apr 05 2009

Keywords

Comments

Same series for 645231

Crossrefs

Showing 1-10 of 106 results. Next