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

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

Original entry on oeis.org

1, 0, 1, 2, 9, 44, 265, 1854, 4752, 12072, 30500, 76038, 190656, 481318, 1224852, 3117528, 7944464, 20283046, 51912320, 133129054, 341972624, 879678624, 2266157892, 5846150862, 15101728320, 39058470566, 101135401556, 262158219552, 680253580304, 1766843951390
Offset: 0

Views

Author

Alois P. Heinz, Jul 15 2015

Keywords

Comments

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

Examples

			a(8) = 4752: 21436587, 21436785, 21436857, 21437586, ..., 87653421, 87654123, 87654312, 87654321.
		

Crossrefs

Programs

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

Formula

G.f.: -(631*x^43 +953*x^42 -174*x^41 -3296*x^40 -6097*x^39 -3581*x^38 -11543*x^37 -14483*x^36 +3789*x^35 +67487*x^34 +120551*x^33 +88025*x^32 +64863*x^31 +14567*x^30 -69173*x^29 -386577*x^28 -600146*x^27 -488818*x^26 -105459*x^25 +188333*x^24 +315070*x^23 +540030*x^22 +633950*x^21 +478098*x^20 +53481*x^19 -202345*x^18 -260532*x^17 -228778*x^16 -157245*x^15 -78737*x^14 +1943*x^13 +17159*x^12 +13669*x^11 +7299*x^10 +3547*x^9 +981*x^8 -1103*x^7 -151*x^6 -25*x^5 -5*x^4 +3*x -1) / ((x-1) *(x+1) *(x^2+x+1) *(x^2-x+1) *(x^13-x^11+x^10-x^9-x^8-9*x^7 -3*x^6+3*x^5+7*x^4-x^3+x^2+2*x-1) *(x^3+x^2+x-1) *(x^3-x^2-x-1) *(x^12+x^11+x^10-x^8+x^7-8*x^6-7*x^5-5*x^4-2*x^3-x^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 *)

A033305 Number of permutations (p1,...,pn) such that 1 <= |pk - k| <= 2 for all k.

Original entry on oeis.org

1, 0, 1, 2, 4, 6, 13, 24, 45, 84, 160, 300, 565, 1064, 2005, 3774, 7108, 13386, 25209, 47472, 89401, 168360, 317056, 597080, 1124425, 2117520, 3987721, 7509690, 14142276, 26632782, 50154949, 94451976, 177872293
Offset: 0

Views

Author

Keywords

References

  • Lehmer, D. H.; Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), pp. 755-770. North-Holland, Amsterdam, 1970.
  • R. P. Stanley, Enumerative Combinatorics I, p. 252, Example 4.7.16.

Crossrefs

Column k=2 of A259776.

Programs

  • Magma
    I:=[1,0,1,2,4]; [n le 5 select I[n] else Self(n-1) +Self(n-2) +Self(n-3) +Self(n-4) -Self(n-5): n in [1..41]]; // G. C. Greubel, Jan 14 2022
    
  • Mathematica
    LinearRecurrence[{1,1,1,1,-1},{1,0,1,2,4},40] (* Harvey P. Dale, Aug 28 2012 *)
  • Maxima
    h(n) := sum(sum(binomial(k,r) *sum(binomial(r,m) *sum(binomial(m,j) *binomial(j,n-m-k-j-r) *(-1)^(n-m-k-j-r), j,0,m), m,0,r), r,0,k), k,1,n); a(n):=h(n)-h(n-1); /* Vladimir Kruchinin, Sep 10 2010 */
    
  • SageMath
    [( (1-x)/((1+x)*(1-2*x+x^2-2*x^3+x^4)) ).series(x,n+1).list()[n] for n in (0..40)] # G. C. Greubel, Jan 14 2022

Formula

G.f.: (1-x)/((1+x)*(1 - 2*x + x^2 - 2*x^3 + x^4)).
a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) - a(n-5).
a(n) = h(n) - h(n-1), n>0, h(n) = Sum_{k=1..n} (Sum_{r=0..k} (C(k,r)*Sum_{m=0..r}(C(r,m)*Sum_{j=0..m} C(m,j)*C(j,n-m-k-j-r)*(-1)^(n-m-k-j-r) ))). - Vladimir Kruchinin, Sep 10 2010
Limit_{n -> oo} a(n)/a(n-1) = (1 + sqrt(2) + sqrt(2*sqrt(2)-1)) /2 = 1.88320350591... for n>2. Limit_{n -> oo} a(n-1)/a(n) = (1 + sqrt(2) - sqrt(2*sqrt(2)-1)) /2 = 0.53101005645... for n>0. - Tim Monahan, Aug 09 2011
7*a(n) = 2*(-1)^n - 8*A112575(n) - 2*A112575(n-2) + 6*A112575(n-1) + 5*A112575(n+1). - R. J. Mathar, Sep 27 2013
Empirical: a(n) + a(n+1) = A183324(n). - R. J. Mathar, Sep 27 2013

Extensions

New description from Max Alekseyev, Jul 09 2006

A000804 Permanent of a certain cyclic n X n (0,1) matrix.

Original entry on oeis.org

1, 1, 2, 6, 24, 120, 265, 579, 1265, 2783, 6208, 13909, 31337, 70985, 161545, 369024, 845825, 1944295, 4480285, 10345391, 23930320, 55435605, 128577253, 298529333, 693718721, 1613210120, 3753680073, 8738534315, 20351593033, 47413960239, 110493496000
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of permutations of [ n ] allowing i->i+j (mod n), j=0..4.

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000805.
Fifth column of triangle A008305. - Vladeta Jovovic, Oct 03 2003
Cf. A260074. - Alois P. Heinz, Jul 14 2015

Programs

  • Maple
    a:= n-> `if`(n<5, n!, (Matrix(11, (i,j)-> if i+1=j then 1 elif i=11 then [-1, -1, 2, 2, 4, 2, -6, -2, -2, 0, 3][j] else 0 fi)^(n+6). <<41, -16, 33, -1, 5, -1, 16, 5, 13, 29, 65>>)[1,1]): seq(a(n), n=0..30);
  • Mathematica
    a[n_] := If[n<5, n!, ((Table[Which[i+1 == j, 1, i == 11, {-1, -1, 2, 2, 4, 2, -6, -2, -2, 0, 3}[[j]], True, 0], {i, 1, 11}, {j, 1, 11}] // MatrixPower[#, n+6]&).{41, -16, 33, -1, 5, -1, 16, 5, 13, 29, 65}) // First]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Mar 17 2014, after Alois P. Heinz *)

Formula

G.f.: (41*x^15 +64*x^14 -48*x^13 -113*x^12 -213*x^11 -190*x^10 +122*x^9 +158*x^8 +150*x^7 +75*x^6 -60*x^5 -10*x^4 -2*x^3 +x^2 +2*x -1) / (-x^11 -x^10 +2*x^9 +2*x^8 +4*x^7 +2*x^6 -6*x^5 -2*x^4 -2*x^3 +3*x -1).

Extensions

More terms from Vladeta Jovovic, Oct 03 2003
Edited by Alois P. Heinz, Dec 18 2010
Showing 1-10 of 10 results.