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.

User: Tom Roby

Tom Roby's wiki page.

Tom Roby has authored 11 sequences. Here are the ten most recent ones:

A212432 Number of equivalence classes of S_n under transformations of positionally and numerically adjacent elements of the form abc <--> acb <--> cba where a

Original entry on oeis.org

1, 1, 2, 4, 16, 84, 536, 3912, 32256, 297072, 3026112, 33798720, 410826624, 5399704320, 76317546240, 1154312486400, 18604815528960, 318348065548800, 5763746405053440, 110086912964367360, 2212209395234979840, 46657233031296706560, 1030510550216174469120
Offset: 0

Author

Tom Roby, Jun 21 2012

Keywords

Comments

Also number of equivalence classes of S_n under transformations of positionally and numerically adjacent elements of the form abc <--> bac <--> cba where a < b < c.

Examples

			From _Alois P. Heinz_, Jun 22 2012: (Start)
a(3) = 4: {123, 132, 321}, {213}, {231}, {312}.
a(4) = 16: {1234, 1243, 1324, 1432, 3214}, {1342}, {1423}, {2134}, {2143}, {2314}, {2341, 2431, 4123, 4132, 4321}, {2413}, {3124}, {3142}, {3241}, {3412}, {3421}, {4213}, {4231}, {4312}.
a(5) = 84: {12345, 12354, 12435, 12543, 13245, 13254, 14325, 32145, 32154}, {12453}, ..., {53421}, {54213}, {54231}.
(End)
		

Crossrefs

Formula

From Seiichi Manyama, Feb 21 2024: (Start)
G.f.: Sum_{k>=0} k! * ( x * (1-2*x^2) )^k.
a(n) = Sum_{k=0..floor(n/3)} (-2)^k * (n-2*k)! * binomial(n-2*k,k). (End)

Extensions

a(9) from Alois P. Heinz, Jun 23 2012
a(10)-a(22) from Alois P. Heinz, Apr 14 2021

A212433 Number of equivalence classes of S_n under transformations of positionally and numerically adjacent elements of the form abc <--> acb <--> bac <--> cba, where a

Original entry on oeis.org

1, 1, 2, 3, 13, 71, 470, 3497, 29203, 271500, 2786711, 31322803, 382794114, 5054810585, 71735226535, 1088920362030, 17607174571553, 302143065676513, 5484510055766118, 104999034898520903, 2114467256458136473, 44682676397748896010, 988663144904696100347
Offset: 0

Author

Tom Roby, Jun 21 2012

Keywords

Examples

			From _Alois P. Heinz_, Jun 23 2012: (Start)
a(3) = 3: {123, 132, 213, 321}, {231}, {312}.
a(4) = 13: {1234, 1243, 1324, 1432, 2134, 3214}, {1342}, {1423}, {2143}, {2314}, {2341, 2431, 3241, 4123, 4132, 4213, 4321}, {2413}, {3124}, {3142}, {3412}, {3421}, {4231}, {4312}.
a(5) = 71: {12345, 12354, 12435, 12543, 13245, 13254, 14325, 21345, 21354, 21435, 21543, 32145, 32154}, {12453}, ..., {53412}, {53421}, {54231}.
(End)
		

Crossrefs

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(sum(k=0, N, k!*(x*((1-x^2)^2/(1-x^3)-x^2))^k)) \\ Seiichi Manyama, Feb 25 2024

Formula

G.f.: Sum_{k>=0} k! * ( x * ((1-x^2)^2/(1-x^3) - x^2) )^k. - Seiichi Manyama, Feb 25 2024

Extensions

a(8)-a(9) from Alois P. Heinz, Jun 23 2012
a(10)-a(22) from Alois P. Heinz, Apr 14 2021

A212580 Number of equivalence classes of S_n under transformations of positionally and numerically adjacent elements of the form abc <--> acb where a

Original entry on oeis.org

1, 1, 2, 5, 20, 102, 626, 4458, 36144, 328794, 3316944, 36755520, 443828184, 5800823880, 81591320880, 1228888215960, 19733475278880, 336551479543440, 6075437671458000, 115733952138747600, 2320138519554562560, 48827468196234035280, 1076310620915575933440
Offset: 0

Author

Tom Roby, May 21 2012

Keywords

Comments

Also the number of equivalence classes of S_n under transformations of positionally and numerically adjacent elements of the form abc <--> bac where a
Also the number of equivalence classes of S_n under transformations of positionally and numerically adjacent elements of the form abc <--> cba where a
Also the number of permutations of [n] avoiding consecutive triples j, j+1, j-1. a(4) = 20 = 4! - 4 counts all permutations of [4] except 1342, 2314, 3421, 4231. - Alois P. Heinz, Apr 14 2021

Examples

			From _Alois P. Heinz_, May 22 2012: (Start)
a(3) = 5: {123, 132}, {213}, {231}, {312}, {321}.
a(4) = 20: {1234, 1243, 1324}, {1342}, {1423}, {1432}, {2134}, {2143}, {2314}, {2341, 2431}, {2413}, {3124}, {3142}, {3214}, {3241}, {3412}, {3421}, {4123, 4132}, {4213}, {4231}, {4312}, {4321}. (End)
		

Crossrefs

Programs

  • Maple
    b:= proc(s, x, y) option remember; `if`(s={}, 1, add(
          `if`(x=0 or x-y<>1 or j-x<>1, b(s minus {j}, y, j), 0), j=s))
        end:
    a:= n-> b({$1..n}, 0$2):
    seq(a(n), n=0..14);  # Alois P. Heinz, Apr 14 2021
    # second Maple program:
    a:= proc(n) option remember; `if`(n<5, [1$2, 2, 5, 20][n+1],
           n*a(n-1)+3*a(n-2)-(2*n-2)*a(n-3)+(n-2)*a(n-5))
        end:
    seq(a(n), n=0..22);  # Alois P. Heinz, Apr 14 2021
  • Mathematica
    a[n_] := a[n] = If[n < 5, {1, 1, 2, 5, 20}[[n+1]],
         n*a[n-1] + 3*a[n-2] - (2n - 2)*a[n-3] + (n-2)*a[n-5]];
    Table[a[n], {n, 0, 22}] (* Jean-François Alcover, Apr 20 2022, after Alois P. Heinz *)
  • PARI
    my(N=30, x='x+O('x^N)); Vec(sum(k=0, N, k!*(x*(1-x^2))^k)) \\ Seiichi Manyama, Feb 20 2024

Formula

From Seiichi Manyama, Feb 20 2024: (Start)
G.f.: Sum_{k>=0} k! * ( x * (1-x^2) )^k.
a(n) = Sum_{k=0..floor(n/3)} (-1)^k * (n-2*k)! * binomial(n-2*k,k). (End)

Extensions

a(9)-a(22) from Alois P. Heinz, Apr 14 2021

A212581 Number of equivalence classes of S_n under transformations of positionally and numerically adjacent elements of the form abc <--> acb <--> bac where a

Original entry on oeis.org

1, 1, 2, 4, 17, 89, 556, 4011, 32843, 301210, 3059625, 34104275, 413919214, 5434093341, 76734218273, 1159776006262, 18681894258591, 319512224705645, 5782488507020050, 110407313135273127, 2218005876646727423, 46767874983437110354, 1032732727339665789981
Offset: 0

Author

Tom Roby, May 21 2012

Keywords

Examples

			From _Alois P. Heinz_, May 22 2012: (Start)
a(3) = 4: {123, 132, 213}, {231}, {312}, {321}.
a(4) = 17: {1234, 1243, 1324, 2134}, {1342}, {1423}, {1432}, {2143}, {2314}, {2341, 2431, 3241}, {2413}, {3124}, {3142}, {3214}, {3412}, {3421}, {4123, 4132, 4213}, {4231}, {4312}, {4321}. (End)
		

Programs

  • PARI
    my(N=30, x='x+O('x^N)); Vec(sum(k=0, N, k!*(x*(1-x^2)^2/(1-x^3))^k)) \\ Seiichi Manyama, Feb 20 2024

Formula

G.f.: Sum_{k>=0} k! * ( x * (1-x^2)^2/(1-x^3) )^k. - Seiichi Manyama, Feb 20 2024

Extensions

a(9) from Alois P. Heinz, May 22 2012
a(10)-a(22) from Alois P. Heinz, Apr 14 2021

A212418 Size of the equivalence class of S_n containing the identity permutation under transformations of positionally adjacent elements of the form abc <--> acb <--> cba where a

Original entry on oeis.org

1, 1, 1, 3, 9, 54, 285, 2160, 15825, 151200, 1411095, 16329600, 185067855, 2514758400, 33530101605, 523069747200, 8020402655265, 141228831744000, 2447966414868975, 48017802792960000, 928344187296100575, 20071441567457280000, 428190753438433910925
Offset: 0

Author

Tom Roby, May 15 2012

Keywords

Comments

Also size of the equivalence class of S_n containing the identity permutation under transformations of positionally adjacent elements of the form abc <--> bac <--> cba where a

Examples

			From _Alois P. Heinz_, May 21 2012: (Start)
a(3) = 3: {123, 132, 321}.
a(4) = 9: {1234, 1243, 1324, 1342, 1423, 1432, 3214, 4213, 4312}. (End)
		

Crossrefs

Cf. A210669.

Programs

  • Maple
    a:= proc(n) local k;
           k:= iquo(n, 2, 'r');
          `if`(n<3, 1, `if`(r=0, (3/2)*k*(k-1/3)*(2*k-2)!
           -doublefactorial(2*k-3), (3/2)*k*(k+1)*(2*k-1)!))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, May 20 2012
  • Mathematica
    a[n_ /; n < 3] = 1;
    a[n_?OddQ] := With[{k = (n - 1)/2}, (3/2)*k*(k + 1)*(2 k - 1)!];
    a[n_?EvenQ] := With[{k = n/2}, (3/2)*k*(k - 1/3)*(2 k - 2)! - (2 k - 3)!!];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 07 2017 *)

Formula

a(n) = 1 for n<3, otherwise: a(2k+1) = (3/2)*k*(k+1)*(2k-1)!, a(2k) = (3/2)*k*(k-1/3)*(2k-2)!-(2k-3)!!.

A212419 Size of the equivalence class of S_n containing the identity permutation under transformations of positionally adjacent elements of the form abc <--> acb <--> bac <--> cba, where a

Original entry on oeis.org

1, 1, 1, 4, 21, 116, 713, 5030, 40301, 362852, 3628744, 39916716, 479001426, 6227020536, 87178290639, 1307674367142, 20922789886141, 355687428093140, 6402373705721708, 121645100408822276, 2432902008176618342, 51090942171709406408, 1124000727777607604418
Offset: 0

Author

Tom Roby, May 15 2012

Keywords

Comments

Pierrot, Rossin, and West were first to give a formula and the alternate characterization: all permutations in S_n except the alternating permutations in which the elements in odd positions form a decreasing sequence, and the elements in even positions also form a decreasing sequence.

Crossrefs

Cf. A000108.

Programs

  • Maple
    C:= n-> binomial(2*n, n)/(n+1):
    a:= n-> `if`(n<3, 1, n!-C(floor((n-1)/2))-C(floor(n/2))):
    seq (a(n), n=0..30);  # Alois P. Heinz, May 20 2012
  • Mathematica
    Join[{1,1,1},Table[n!-CatalanNumber[Floor[(n-1)/2]]-CatalanNumber[ Floor[ n/2]],{n,3,30}]] (* Harvey P. Dale, Dec 31 2013 *)

Formula

a(n) = 1 for n<3, otherwise: a(n) = n!-C([(n-1)/2])-C([n/2]), where [x] is the floor function and C(n) denotes the n-th Catalan number (A000108).

A212417 Size of the equivalence class of S_n containing the identity permutation under transformations of positionally adjacent elements of the form abc <--> acb <--> bac where a

Original entry on oeis.org

1, 1, 1, 3, 7, 35, 135, 945, 5193, 46737
Offset: 0

Author

Tom Roby, May 15 2012

Keywords

Examples

			From _Alois P. Heinz_, May 16 2012: (Start)
a(3) = 3: {123, 132, 213}.
a(4) = 7: {1234, 1243, 1324, 1423, 2134, 2143, 2314}. (End)
		

Crossrefs

Extensions

a(0)-a(2), a(9) from Alois P. Heinz, May 16 2012

A210668 Number of equivalence classes of S_n under transformations of positionally adjacent elements of the form abc <--> cba where a

Original entry on oeis.org

1, 1, 2, 5, 16, 60, 260, 1260, 6744, 39303
Offset: 0

Author

Tom Roby, May 08 2012

Keywords

Examples

			From _Alois P. Heinz_, May 16 2012: (Start)
a(3) = 5: {123, 321}, {132}, {213}, {231}, {312}.
a(4) = 16: {1234, 1432, 3214}, {1243, 4213}, {1324}, {1342, 4312}, {1423}, {2134, 2431}, {2143}, {2314}, {2341, 4123, 4321}, {2413}, {3124, 3421}, {3142}, {3241}, {3412}, {4132}, {4231}. (End)
		

Crossrefs

Extensions

Definition improved by Tom Roby, May 15 2012
a(0)-a(2), a(9) from Alois P. Heinz, May 16 2012

A210671 Number of equivalence classes of S_n under transformations of positionally adjacent elements of the form abc <--> acb <--> bac <--> cba, where a

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 8, 11, 20, 29, 57
Offset: 0

Author

Tom Roby, May 08 2012

Keywords

Extensions

Definition improved by Tom Roby, May 15 2012

A210669 Number of equivalence classes of S_n under transformations of positionally adjacent elements of the form abc <--> acb <--> cba where a

Original entry on oeis.org

1, 1, 2, 4, 8, 14, 27, 68, 159, 496
Offset: 0

Author

Tom Roby, May 08 2012

Keywords

Comments

Also number of equivalence classes of S_n under transformations of positionally adjacent elements of the form abc <--> bac <--> cba where a

Examples

			From _Alois P. Heinz_, May 19 2012: (Start)
a(3) = 4: {123, 132, 321}, {213}, {231}, {312}.
a(4) = 8: {1234, 1243, 1324, 1342, 1423, 1432, 3214, 4213, 4312}, {2134, 2143, 2341, 2431, 4123, 4132, 4321}, {2314}, {2413}, {3124, 3142, 3421}, {3241}, {3412}, {4231}. (End)
		

Crossrefs

Extensions

Definition improved and comment added by Tom Roby, May 15 2012