cp's OEIS Frontend

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.

A387021 Number of permutations (p(1),p(2),...,p(n)) of (1,2,...,n) such that p(i)-i is in {-2,0,7} for all i=1,...,n.

This page as a plain text file.
%I A387021 #7 Aug 18 2025 16:02:03
%S A387021 1,1,1,1,1,1,1,1,1,2,3,5,7,10,13,17,21,25,30,36,46,59,81,109,153,207,
%T A387021 277,361,463,589,743,949,1211,1589,2083,2773,3670,4861,6388,8344,
%U A387021 10848,14019,18166,23479,30556,39762,52049,68125,89345,117034,153078,199979,260572,339546,441669,575341
%N A387021 Number of permutations (p(1),p(2),...,p(n)) of (1,2,...,n) such that p(i)-i is in {-2,0,7} for all i=1,...,n.
%D A387021 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 A387021 V. Baltic, <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 A387021 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 A387021 <a href="/index/Rec#order_36">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,0,4,-3,3,-2,2,-1,1,0,0,-6,3,-6,2,-3,0,0,0,0,4,-1,3,0,0,0,0,0,0,-1).
%F A387021 a(n) = a(n-1) + 4*a(n-9) - 3*a(n-10) + 3*a(n-11) - 2*a(n-12) + 2*a(n-13) - a(n-14) + a(n-15) - 6*a(n-18) + 3*a(n-19) - 6*a(n-20) + 2*a(n-21) - 3*a(n-22) + 4*a(n-27) - a(n-28) + 3*a(n-29) - a(n-36) for n >= 36.
%F A387021 G.f.: (1 - 3*x^9 - 2*x^11 - x^13 + 3*x^18 + 2*x^20 - x^27)/ (1 - x - 4*x^9 + 3*x^10 - 3*x^11 + 2*x^12 - 2*x^13 + x^14 - x^15 + 6*x^18 - 3*x^19 + 6*x^20 - 2*x^21 + 3*x^22 - 4*x^27 + x^28 - 3*x^29 + x^36).
%e A387021 a(9)=2: 123456789, 891234567.
%t A387021 CoefficientList[Series[(1 - 3*x^9 - 2*x^11 - x^13 + 3*x^18 + 2*x^20 - x^27)/ (1 - x - 4*x^9 + 3*x^10 - 3*x^11 + 2*x^12 - 2*x^13 + x^14 - x^15 + 6*x^18 - 3*x^19 + 6*x^20 - 2*x^21 + 3*x^22 - 4*x^27 + x^28 - 3*x^29 + x^36),{x,0,55}],x]
%t A387021 LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 4, -3, 3, -2, 2, -1, 1, 0, 0, -6, 3, -6, 2, -3, 0, 0, 0, 0, 4, -1, 3, 0, 0, 0, 0, 0, 0, -1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 5, 7, 10, 13, 17, 21, 25, 30, 36, 46, 59, 81, 109, 153, 207, 277, 361, 463, 589, 743, 949, 1211, 1589, 2083, 2773}, 56]
%Y A387021 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 A387021 easy,nonn
%O A387021 0,10
%A A387021 _Michael A. Allen_, Aug 13 2025