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.
%I A002527 M1626 N0637 #52 Oct 28 2023 14:19:23 %S A002527 0,1,2,6,18,60,184,560,1695,5200,15956,48916,149664,458048,1402360, %T A002527 4294417,13149210,40259178,123260854,377395940,1155508592,3537919648, %U A002527 10832298239,33165996032,101546731816,310913195800,951945967120,2914642812096,8923975209168 %N A002527 Number of permutations p on the set [n] with the properties that abs(p(i)-i) <= 3 for all i and p(1) <= 3. %C A002527 a(n) is also the permanent of the n X n matrix that has ones on its diagonal, ones on its three superdiagonals, ones on its three subdiagonals (with the exception of a single zero in the (4,1)-entry), and is zero elsewhere. %C A002527 This is the second row of Kløve's Table 3. %D A002527 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A002527 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A002527 Alois P. Heinz, <a href="/A002527/b002527.txt">Table of n, a(n) for n = 0..1000</a> (first 92 terms from Nathaniel Johnston) %H A002527 Torleiv Kløve, <a href="http://www.ii.uib.no/publikasjoner/texrap/pdf/2008-376.pdf"> Spheres of Permutations under the Infinity Norm - Permutations with limited displacement. </a> Reports in Informatics, Department of Informatics, University of Bergen, Norway, no. 376, November 2008. %H A002527 R. Lagrange, <a href="http://archive.numdam.org/article/ASENS_1962_3_79_3_199_0.pdf">Quelques résultats dans la métrique des permutations</a>, Annales Scientifiques de l'École Normale Supérieure, Paris, 79 (1962), 199-241. %H A002527 <a href="/index/Rec#order_14">Index entries for linear recurrences with constant coefficients</a>, signature (2,2,0,10,8,-2,-16,-10,-2,4,2,0,2,1). %F A002527 From _Nathaniel Johnston_, Apr 03 2011: (Start) %F A002527 a(n) = A002526(n) - A188379(n-1). %F A002527 a(n) = a(n-1) + A002526(n-1) + A002529(n-1). (End) %F A002527 G.f.: x*(x^7+2*x^6-2*x^4-2*x^3-1) / (x^14 +2*x^13 +2*x^11 +4*x^10 -2*x^9 -10*x^8 -16*x^7 -2*x^6 +8*x^5 +10*x^4 +2*x^2 +2*x-1). - _Alois P. Heinz_, Apr 07 2011 %p A002527 with(LinearAlgebra): %p A002527 A002527:= n-> `if`(n=0, 0, Permanent(Matrix(n, (i, j)-> %p A002527 `if`(abs(j-i)<4 and [i, j]<>[4, 1], 1, 0)))): %p A002527 seq(A002527(n), n=0..20); %t A002527 A002527[n_] := If [n == 0, 0, Permanent[Table[If [Abs[j-i]<4 && {i, j} != {4, 1}, 1, 0], {i, 1, n}, {j, 1, n}]]]; Table [A002527[n], {n, 0, 25}] (* _Jean-François Alcover_, Mar 11 2014, after Maple *) %K A002527 nonn %O A002527 0,3 %A A002527 _N. J. A. Sloane_ %E A002527 Name and comments edited, and terms after a(11) added by _Nathaniel Johnston_, Apr 03 2011