A002524 Number of permutations of length n within distance 2 of a fixed permutation.
1, 1, 2, 6, 14, 31, 73, 172, 400, 932, 2177, 5081, 11854, 27662, 64554, 150639, 351521, 820296, 1914208, 4466904, 10423761, 24324417, 56762346, 132458006, 309097942, 721296815, 1683185225, 3927803988, 9165743600, 21388759708, 49911830577, 116471963129
Offset: 0
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.
- 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).
- R. P. Stanley, Enumerative Combinatorics I, Example 4.7.16, p. 253.
Links
- R. H. Hardin, Table of n, a(n) for n = 0..400, Jul 11 2010
- V. Baltic, On the number of certain types of strongly restricted permutations, Appl. An. Disc. Math. 4 (2010), 119-135; DOI:10.2298/AADM1000008B.
- M. Barnabei, F. Bonetti and M. Silimbani, Two permutation classes related to the Bubble Sort operator, Electronic Journal of Combinatorics 19(3) (2012), #P25. - From _N. J. A. Sloane_, Dec 25 2012
- Fan R. K. Chung, Persi Diaconis, and Ron Graham, Permanental generating functions and sequential importance sampling, Stanford University (2018).
- Torleiv Kløve, Spheres of Permutations under the Infinity Norm - Permutations with limited displacement, Reports in Informatics, Department of Informatics, University of Bergen, Norway, no. 376, November 2008.
- Torleiv Kløve, Generating functions for the number of permutations with limited displacement, Electron. J. Combin., 16 (2009), #R104. - From _N. J. A. Sloane_, May 04 2011.
- O. Krafft and M. Schaefer, On the number of permutations within a given distance, Fib. Quart. 40 (5) (2002) 429-434.
- Ting Kuo, K-sorted Permutations with Weakly Restricted Displacements, Journal of Computers, 2014. See p. 36.
- R. Lagrange, Quelques résultats dans la métrique des permutations, Annales Scientifiques de l'École Normale Supérieure, Paris, 79 (1962), 199-241.
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
- Andrew Tsao, Sampling Methodology for Intractable Counting Problems, Ph. D. Thesis, Stanford University (2020).
- Index entries for linear recurrences with constant coefficients, signature (2,0,2,0,-1).
Crossrefs
Column k=2 of A306209.
Programs
-
Magma
I:=[1,1,2,6,14]; [n le 5 select I[n] else 2*Self(n-1) +2*Self(n-3) -Self(n-5): n in [1..41]]; // G. C. Greubel, Jan 21 2022
-
Mathematica
CoefficientList[Series[(1-x)/(1-2*x-2*x^3+x^5), {x,0,50}], x] (* Vladimir Joseph Stephan Orlovsky, Jun 24 2011 *)
-
PARI
a(n)=if(n,([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; -1,0,2,0,2]^n*[1;1;2;6;14])[1,1],1) \\ Charles R Greathouse IV, Jul 28 2015
-
Sage
[( (1-x)/(1-2*x-2*x^3+x^5) ).series(x,n+1).list()[n] for n in (0..40)] # G. C. Greubel, Jan 21 2022
Formula
G.f.: (1-x)/(1-2*x-2*x^3+x^5). - Simon Plouffe in his 1992 dissertation.
Extensions
Typo in comment corrected by Vaclav Kotesovec, Dec 01 2012
Comments