login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A002526
Number of permutations of length n within distance 3 of a fixed permutation.
(Formerly M1671 N0657)
27
1, 1, 2, 6, 24, 78, 230, 675, 2069, 6404, 19708, 60216, 183988, 563172, 1725349, 5284109, 16177694, 49526506, 151635752, 464286962, 1421566698, 4352505527, 13326304313, 40802053896, 124926806216, 382497958000, 1171122069784, 3585709284968, 10978628154457
OFFSET
0,3
COMMENTS
For positive n, a(n) equals the permanent of the n X n matrix with 1's along the seven 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).
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.
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. (Table 3, top row).
O. Krafft and M. Schaefer, On the number of permutations within a given distance, Fib. Quart. 40 (5) (2002) 429-434.
R. Lagrange, Quelques résultats dans la métrique des permutations, Annales Scientifiques de l'École Normale Supérieure, Paris, 79 (1962), 199-241.
Index entries for linear recurrences with constant coefficients, signature (2,2,0,10,8,-2,-16,-10,-2,4,2,0,2,1).
FORMULA
G.f.: (1-x-2*x^2-2*x^4+x^7+x^8)/(1-2*x-2*x^2-10*x^4-8*x^5+2*x^6+16*x^7+10*x^8 +2*x^9-4*x^10-2*x^11-2*x^13-x^14).
a(0)=1, a(1)=1, a(2)=2, a(3)=6, a(4)=24, a(5)=78, a(6)=230, a(7)=675, a(8)=2069, a(9)=6404, a(10)=19708, a(11)=60216, a(12)=183988, a(13)=563172, a(n) = 2*a(n-1) +2*a(n-2) +10*a(n-4) +8*a(n-5) -2*a(n-6) -16*a(n-7) -10*a(n-8) -2*a(n-9) +4*a(n-10) +2*a(n-11) +2*a(n-13) +a(n-14). - Harvey P. Dale, Jun 22 2011
MATHEMATICA
CoefficientList[Series[(1-x-2x^2-2x^4+x^7+x^8)/(1-2x-2x^2-10x^4-8x^5+ 2x^6+ 16x^7+10x^8+2x^9-4x^10-2x^11-2x^13-x^14), {x, 0, 50}], x] (* or *) LinearRecurrence[{2, 2, 0, 10, 8, -2, -16, -10, -2, 4, 2, 0, 2, 1}, {1, 1, 2, 6, 24, 78, 230, 675, 2069, 6404, 19708, 60216, 183988, 563172}, 51] (* Harvey P. Dale, Jun 22 2011 *)
PROG
(PARI) Vec((1-x-2*x^2-2*x^4+x^7+x^8)/(1-2*x-2*x^2-10*x^4-8*x^5+2*x^6+16*x^7+10*x^8+2*x^9-4*x^10-2*x^11-2*x^13-x^14)+O(x^99)) \\ Charles R Greathouse IV, Jul 16 2011
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1-x-2*x^2-2*x^4+x^7+x^8)/(1-2*x-2*x^2-10*x^4-8*x^5+2*x^6+16*x^7+10*x^8 +2*x^9-4*x^10-2*x^11-2*x^13-x^14) )); // G. C. Greubel, Jan 22 2022
(Sage) [( (1-x-2*x^2-2*x^4+x^7+x^8)/(1-2*x-2*x^2-10*x^4-8*x^5+2*x^6+16*x^7+10*x^8 +2*x^9-4*x^10-2*x^11-2*x^13-x^14) ).series(x, n+1).list()[n] for n in (0..40)] # G. C. Greubel, Jan 22 2022
CROSSREFS
The 14 sequences in Kløve's Table 3 are A002526, A002527, A002529, A188379, A188491, A188492, A188493, A188494, A002528, A188495, A188496, A188497, A188498, A002526.
Cf. A002524.
Column k=3 of A306209.
Sequence in context: A263712 A263698 A263747 * A324373 A117665 A068777
KEYWORD
nonn,easy,nice
STATUS
approved