login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002524 Number of permutations of length n within distance 2 of a fixed permutation.
(Formerly M1600 N0626)
88
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
From Torleiv Kløve, Jan 09 2009: (Start)
Let V(d,n) be the number of permutations of length n within distance d of a fixed permutation. For d=1,2,3,4,...,10 these are A000045, A002524, A002526, A072856, A154654, A154655, A154656, A154657, A154658, A154659. The generating function is a rational function f_d(z)/g_d(z) (see the Kløve report referenced here). For d<=6, deg g_d = 2^{d-1} + binomial(2*d,d)/2 and deg f_d(z) = deg g_d(z)-2d. As a table:
d deg g_d deg f_d
1 2 0
2 5 1
3 14 8
4 43 35
5 142 132
6 494 482
(End)
For positive n, a(n) equals the permanent of the n X n matrix with 1's along the five central diagonals, and 0's everywhere else. - John M. Campbell, Jul 09 2011
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).
FORMULA
G.f.: (1-x)/(1-2*x-2*x^3+x^5). - Simon Plouffe in his 1992 dissertation.
MATHEMATICA
CoefficientList[Series[(1-x)/(1-2*x-2*x^3+x^5), {x, 0, 50}], x] (* Vladimir Joseph Stephan Orlovsky, Jun 24 2011 *)
PROG
(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
(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
(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
CROSSREFS
Column k=2 of A306209.
Sequence in context: A263697 A291409 A263746 * A188493 A055292 A327049
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Typo in comment corrected by Vaclav Kotesovec, Dec 01 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 09:40 EDT 2024. Contains 370981 sequences. (Running on oeis4.)