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 A387020 #15 Aug 18 2025 15:43:46 %S A387020 1,1,1,1,1,1,1,2,3,5,7,10,13,16,20,25,34,46,67,94,130,175,231,305,400, %T A387020 540,729,999,1363,1855,2510,3370,4531,6070,8180,11026,14921,20197, %U A387020 27322,36940,49820,67204,90528,122091,164686,222344,300316,405574,547768,739291,997794,1346130 %N A387020 Number of permutations (p(1),p(2),...,p(n)) of (1,2,...,n) such that p(i)-i is in {-2,0,5} for all i=1,...,n. %D A387020 D. H. Lehmer, Permutations with strongly restricted displacements. Combinatorial theory and its applications, II (Proc. Colloq., Balatonfured, 1969), North-Holland, Amsterdam, 1970, pp. 755-770. %H A387020 Vladimir Baltić, <a href="http://pefmath.etf.rs/vol4num1/AADM-Vol4-No1-119-135.pdf">On the number of certain types of strongly restricted permutations</a>, Applicable Analysis and Discrete Mathematics, 4(1) (2010), 119-135. %H A387020 Kenneth Edwards and Michael A. Allen, <a href="https://doi.org/10.1016/j.dam.2015.02.004">Strongly restricted permutations and tiling with fences</a>, Discrete Applied Mathematics, 187 (2015), 82-90. %H A387020 <a href="/index/Rec#order_21">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,3,-2,2,-1,1,0,0,-3,1,-2,0,0,0,0,1). %F A387020 a(n) = a(n-1) + 3*a(n-7) - 2*a(n-8) + 2*a(n-9) - a(n-10) + a(n-11) - 3*a(n-14) + a(n-15) - 2*a(n-16) + a(n-21) for n >= 21. %F A387020 G.f.: (1 - 2*x^7 - x^9 + x^14)/((1 - x)*(1 - x + x^2 - 2*x^3 + x^4 - x^5 - x^7 + x^10)*(1 + x + x^3 + 2*x^4 + x^5 + 2*x^6 + 2*x^7 + x^8 + x^9 + x^10)). %e A387020 a(7) = 2: 1234567, 6712345. %e A387020 a(8) = 3: 12345678, 17823456, 67123458. %t A387020 CoefficientList[Series[(1 - 2*x^7 - x^9 + x^14)/(1 - x - 3*x^7 + 2*x^8 - 2*x^9 + x^10 - x^11 + 3*x^14 - x^15 + 2*x^16 - x^21),{x,0,51}],x] %t A387020 LinearRecurrence[{1, 0, 0, 0, 0, 0, 3, -2, 2, -1, 1, 0, 0, -3, 1, -2, 0, 0, 0, 0, 1}, {1, 1, 1, 1, 1, 1, 1, 2, 3, 5, 7, 10, 13, 16, 20, 25, 34, 46, 67, 94, 130}, 52] %Y A387020 Sequences for numbers of permutations such that p(i)-i is in {-2,0,d} for d=1,..,8: A000930, A006498, A080000, A224809, A387020, A224808, A387021, A224811. %K A387020 easy,nonn %O A387020 0,8 %A A387020 _Michael A. Allen_, Aug 13 2025