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-9 of 9 results.

A260074 Number of permutations p of [n] with no fixed points and cyclic displacement of elements restricted by two: p(i)<>i and (i-p(i) mod n <= 2 or p(i)-i mod n <= 2).

Original entry on oeis.org

1, 0, 1, 2, 9, 44, 80, 144, 260, 448, 808, 1456, 2640, 4788, 8744, 16016, 29444, 54268, 100304, 185824, 344996, 641664, 1195400, 2230176, 4165904, 7790244, 14581640, 27316240, 51209124, 96060300, 180291280, 338538480, 635940356, 1195021888, 2246289704
Offset: 0

Views

Author

Alois P. Heinz, Jul 14 2015

Keywords

Comments

a(n) = A000166(n) for n <= 5.

Examples

			a(6) = 80: 214365, 214635, 215364, 215634, 231564, 231645, 234561, 234615, 235614, 235641, 241365, 241635, 245361, 245631, 261345, 261534, 264315, 264531, 265314, 265341, 312564, 312645, 314265, 314562, 315264, 315642, 341265, 341562, 342561, 342615, 345261, 345612, 361245, 361542, 362514, 362541, 364215, 364512, 365214, 365241, 512364, 512634, 514362, 514632, 531264, 531642, 532614, 532641, 534261, 534612, 541362, 541632, 542361, 542631, 561234, 561342, 562314, 562341, 564231, 564312, 612345, 612534, 614235, 614532, 615234, 615342, 631245, 631542, 632514, 632541, 634215, 634512, 635214, 635241, 641235, 641532, 642315, 642531, 645231, 645312.
		

Crossrefs

Programs

  • Maple
    gf:= -(27*x^14 -13*x^13 -61*x^12 -4*x^11 -70*x^10 +50*x^9 +44*x^8 +10*x^7 +38*x^6 -24*x^5 -6*x^4 +2*x^3 -3*x^2 +3*x-1) / ((x-1) *(x+1) *(x^2+1) *(x^2+x-1) *(x^4-2*x^3+x^2-2*x+1)):
    a:= n-> coeff(series(gf, x, n+1), x, n):
    seq(a(n), n=0..50);
  • Mathematica
    LinearRecurrence[{3,-2,1,-1,-4,3,-1,2,1,-1},{1,0,1,2,9,44,80,144,260,448,808,1456,2640,4788,8744},50] (* Harvey P. Dale, Jul 15 2019 *)

Formula

G.f.: -(27*x^14 -13*x^13 -61*x^12 -4*x^11 -70*x^10 +50*x^9 +44*x^8 +10*x^7 +38*x^6 -24*x^5 -6*x^4 +2*x^3 -3*x^2 +3*x-1) / ((x-1) *(x+1) *(x^2+1) *(x^2+x-1) *(x^4-2*x^3+x^2-2*x+1)).

A257953 Number of permutations p of [n] with no fixed points and cyclic displacement of elements restricted by nine: p(i)<>i and (i-p(i) mod n <= 9 or p(i)-i mod n <= 9).

Original entry on oeis.org

1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, 32071101049, 481066515734, 7697064251745, 130850092279664, 2355301661033953, 44750731559645106, 312426715251262464, 2178674876680100744, 15178362413058474596, 105663183116236278362
Offset: 0

Views

Author

Alois P. Heinz, Jul 19 2015

Keywords

Comments

a(n) = A000166(n) for n <= 19.

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](Matrix(n, (i, j)->
            `if`(i<>j and (i-j mod n<=9 or j-i mod n<=9), 1, 0)))):
    seq(a(n), n=0..20);
  • Mathematica
    a[n_] := If[n == 0, 1, Permanent[Table[If[i != j && (Mod[i - j, n] <= 9 || Mod[j - i, n] <= 9), 1, 0], {i, 1, n}, {j, 1, n}]]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 20}] (* Jean-François Alcover, Jan 06 2016, adapted from Maple *)

A260091 Number of permutations p of [n] with no fixed points and cyclic displacement of elements restricted by seven: p(i)<>i and (i-p(i) mod n <= 7 or p(i)-i mod n <= 7).

Original entry on oeis.org

1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, 32071101049, 481066515734, 2649865335040, 14570246018686, 80002336342276, 438791546196382, 2404416711392528, 13164695578635648, 72030936564665508, 393911127182051942
Offset: 0

Views

Author

Alois P. Heinz, Jul 16 2015

Keywords

Comments

a(n) = A000166(n) for n <= 15.

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](Matrix(n, (i, j)->
            `if`(i<>j and (i-j mod n<=7 or j-i mod n<=7), 1, 0)))):
    seq(a(n), n=0..16);
  • Mathematica
    a[n_] := If[n == 0, 1, Permanent[Table[If[i != j && (Mod[i - j, n] <= 7 || Mod[j - i, n] <= 7), 1, 0], {i, 1, n}, {j, 1, n}]]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 16}] (* Jean-François Alcover, Jan 06 2016, adapted from Maple *)

A260092 Number of permutations p of [n] with no fixed points and cyclic displacement of elements restricted by four: p(i)<>i and (i-p(i) mod n <= 4 or p(i)-i mod n <= 4).

Original entry on oeis.org

1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 440192, 1445100, 4728000, 15405008, 49955280, 162442816, 530284304, 1738077424, 5714461760, 18795784436, 61868602624, 203858323008, 672535917712, 2221505855492, 7345985276816, 24314075406208, 80542683435168
Offset: 0

Views

Author

Alois P. Heinz, Jul 15 2015

Keywords

Comments

a(n) = A000166(n) for n <= 9.

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](Matrix(n, (i, j)->
            `if`(i<>j and (i-j mod n<=4 or j-i mod n<=4), 1, 0)))):
    seq(a(n), n=0..15);
  • Mathematica
    a[n_] := If[n == 0, 1, Permanent[Table[If[i != j && (Mod[i - j, n] <= 4 || Mod[j - i, n] <= 4), 1, 0], {i, 1, n}, {j, 1, n}]]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 15}] (* Jean-François Alcover, Jan 06 2016, adapted from Maple *)

A260094 Number of permutations p of [n] with no fixed points and cyclic displacement of elements restricted by five: p(i)<>i and (i-p(i) mod n <= 5 or p(i)-i mod n <= 5).

Original entry on oeis.org

1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 59245120, 238282730, 956135652, 3828509472, 15296722436, 60990443730, 243596762752, 975165838970, 3913571754304, 15742403448024, 63428117376852, 255662480209770, 1031080275942464, 4161127398011040
Offset: 0

Views

Author

Alois P. Heinz, Jul 15 2015

Keywords

Comments

a(n) = A000166(n) for n <= 11.

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](Matrix(n, (i, j)->
            `if`(i<>j and (i-j mod n<=5 or j-i mod n<=5), 1, 0)))):
    seq(a(n), n=0..15);
  • Mathematica
    a[n_] := If[n == 0, 1, Permanent[Table[If[i != j && (Mod[i - j, n] <= 5 || Mod[j - i, n] <= 5), 1, 0], {i, 1, n}, {j, 1, n}]]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 15}] (* Jean-François Alcover, Jan 06 2016, adapted from Maple *)

A260111 Number of permutations p of [n] with no fixed points and cyclic displacement of elements restricted by six: p(i)<>i and (i-p(i) mod n <= 6 or p(i)-i mod n <= 6).

Original entry on oeis.org

1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, 10930514688, 52034548064, 247272708868, 1173385630596, 5560837425792, 26322368822528, 124470922522980, 589274182149120, 2793967092494408, 13269446868206480, 63125696320334912
Offset: 0

Views

Author

Alois P. Heinz, Jul 16 2015

Keywords

Comments

a(n) = A000166(n) for n <= 13.

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](Matrix(n, (i, j)->
            `if`(i<>j and (i-j mod n<=6 or j-i mod n<=6), 1, 0)))):
    seq(a(n), n=0..16);
  • Mathematica
    a[n_] := If[n == 0, 1, Permanent[Table[If[i != j && (Mod[i - j, n] <= 6 || Mod[j - i, n] <= 6), 1, 0], {i, 1, n}, {j, 1, n}]]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 16}] (* Jean-François Alcover, Jan 06 2016, adapted from Maple *)

A260115 Number of permutations p of [n] with no fixed points and cyclic displacement of elements restricted by eight: p(i)<>i and (i-p(i) mod n <= 8 or p(i)-i mod n <= 8).

Original entry on oeis.org

1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, 32071101049, 481066515734, 7697064251745, 130850092279664, 817154768973824, 5095853023109484, 31742020729513344, 197541094675490640, 1228455950686697872, 7634711586761705092
Offset: 0

Views

Author

Alois P. Heinz, Jul 16 2015

Keywords

Comments

a(n) = A000166(n) for n <= 17.

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](Matrix(n, (i, j)->
            `if`(i<>j and (i-j mod n<=8 or j-i mod n<=8), 1, 0)))):
    seq(a(n), n=0..18);
  • Mathematica
    a[n_] := If[n == 0, 1, Permanent[Table[If[i != j && (Mod[i - j, n] <= 8 || Mod[j - i, n] <= 8), 1, 0], {i, 1, n}, {j, 1, n}]]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 18}] (* Jean-François Alcover, Jan 06 2016, adapted from Maple *)

A260216 Number of permutations p of [n] with no fixed points and cyclic displacement of elements restricted by ten: p(i)<>i and (i-p(i) mod n <= 10 or p(i)-i mod n <= 10).

Original entry on oeis.org

1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, 32071101049, 481066515734, 7697064251745, 130850092279664, 2355301661033953, 44750731559645106, 895014631192902121, 18795307255050944540, 145060238642780180480, 1118480911876659396600
Offset: 0

Views

Author

Alois P. Heinz, Jul 19 2015

Keywords

Comments

a(n) = A000166(n) for n <= 21.

Crossrefs

Programs

  • Maple
    a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](Matrix(n, (i, j)->
            `if`(i<>j and (i-j mod n<=10 or j-i mod n<=10), 1, 0)))):
    seq(a(n), n=0..22);
  • Mathematica
    a[n_] := If[n == 0, 1, Permanent[Table[If[i != j && (Mod[i - j, n] <= 10 || Mod[j - i, n] <= 10), 1, 0], {i, 1, n}, {j, 1, n}]]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 22}] (* Jean-François Alcover, Jan 06 2016, adapted from Maple *)

A079997 Number of permutations satisfying -k<=p(i)-i<=r and p(i)-i not in I, i=1..n, with k=3, r=3, I={0}.

Original entry on oeis.org

1, 0, 1, 2, 9, 24, 57, 140, 376, 1016, 2692, 7020, 18369, 48344, 127465, 335510, 882081, 2319136, 6100393, 16049440, 42220168, 111053856, 292109320, 768373144, 2021186393, 5316647448, 13985104873, 36786882378, 96765680857, 254536684328
Offset: 0

Views

Author

Vladimir Baltic, Feb 17 2003

Keywords

References

  • D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,3,0,6,10,0,-12,-10,-2,0,0,-1,1,1},{1,0,1,2,9,24,57,140,376,1016,2692,7020,18369,48344},40] (* Harvey P. Dale, Nov 27 2013 *)

Formula

a(n) = a(n-1)+3*a(n-2)+6*a(n-4)+10*a(n-5)-12*a(n-7)-10*a(n-8)-2*a(n-9)-a(n-12)+a(n-13)+a(n-14)
G.f.: -(x^8+x^7-x^5-2*x^4+x^3-2*x^2-x+1)/(x^14 +x^13 -x^12 -2*x^9 -10*x^8 -12*x^7 +10*x^5 +6*x^4 +3*x^2 +x-1).
Showing 1-9 of 9 results.