%I #14 Jul 13 2015 21:44:06
%S 1,1,1,1,2,5,10,16,26,43,80,148,264,465,816,1444,2588,4619,8214,14591,
%T 25903,46071,82015,145904,259492,461408,820468,1459332,2595687,
%U 4616613,8210719,14602409,25970414,46189613,82149988,146106304,259853016
%N Number of permutations satisfying -k<=p(i)-i<=r and p(i)-i not in I, i=1..n, with k=3, r=3, I={-1,1,2}.
%C Also, number of permutations satisfying -k<=p(i)-i<=r and p(i)-i not in I, i=1..n, with k=3, r=3, I={-2,-1,1}.
%D 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.
%H Vladimir 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 Vol. 4, No 1 (2010), 119-135
%H <a href="/index/Rec#order_20">Index entries for linear recurrences with constant coefficients</a>, signature (1, 1, 1, -1, 1, 3, -4, -4, -2, 4, 2, -4, 4, 3, -1, -1, -1, 1, -1, -1).
%F a(n) = a(n-1) +a(n-2) +a(n-3) -a(n-4) +a(n-5) +3*a(n-6) -4*a(n-7) -4*a(n-8) -2*a(n-9) +4*a(n-10) +2*a(n-11) -4*a(n-12) +4*a(n-13) +3*a(n-14) -a(n-15) -a(n-16) -a(n-17) +a(n-18) -a(n-19) -a(n-20)
%F G.f.: -(x^14-x^12+2*x^11-x^9-x^8+x^6-x^5+2*x^3+x^2-1)/((x^19 -x^17 +2*x^16 -x^15 +2*x^14 -5*x^13 +x^12 +3*x^11 -5*x^10 +x^9 +x^8 +3*x^7 +x^6 -4*x^5 +3*x^4 -2*x^3 +x^2 -2*x+1) *(x+1))
%t CoefficientList[Series[-(x^14-x^12+2x^11-x^9-x^8+x^6-x^5+2x^3+x^2-1)/ ((x^19-x^17+2x^16x^15+2x^14-5x^13+x^12+3x^11-5x^10+x^9+x^8+ 3x^7+x^6- 4x^5+ 3x^4- 2x^3+ x^2-2x+1)(x+1)),{x,0,40}],x] (* or *) LinearRecurrence[ {1,1,1,-1,1,3,-4,-4,-2,4,2,-4,4,3,-1,-1,-1,1,-1,-1},{1,1,1,1,2,5,10,16,26,43,80,148,264,465,816,1444,2588,4619,8214,14591},50] (* _Harvey P. Dale_, Feb 07 2015 *)
%Y Cf. A002524-A002529, A072827, A072850-A072856, A079955-A080014.
%K nonn
%O 0,5
%A _Vladimir Baltic_, Feb 17 2003