%I #15 Jul 29 2024 09:48:33
%S 1,2,6,24,96,330,1066,3451,11581,39264,132784,446460,1497108,5023696,
%T 16878488,56739141,190697893,640763258,2152824662,7233281108,
%U 24304468132,81666680202,274410023170,922040339607,3098121457769
%N Number of permutations satisfying i-3<=p(i)<=i+4, i=1..n.
%H R. H. Hardin, <a href="/A072854/b072854.txt">Table of n, a(n) for n=1..400</a>
%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 (April, 2010), 119-135
%H <a href="/index/Rec#order_34">Index entries for linear recurrences with constant coefficients</a>, signature (0, 3, 10, 24, 58, 128, 226, 164, 66, 8, 50, -72, -374, -640, -630, -518, -390, -426, -466, -216, 94, 48, 22, 52, 38, 48, 22, -8, -2, 0, -2, -1, -2, -1).
%F Recurrence: a(n) = 3*a(n - 2) + 10*a(n - 3) + 24*a(n - 4) + 58*a(n - 5) + 128*a(n - 6) + 226*a(n - 7) + 164*a(n - 8) + 66*a(n - 9) + 8*a(n - 10) + 50*a(n - 11) - 72*a(n - 12) - 374*a(n - 13) - 640*a(n - 14) - 630*a(n - 15) - 518*a(n - 16) - 390*a(n - 17) - 426*a(n - 18) - 466*a(n - 19) - 216*a(n - 20) + 94*a(n - 21) + 48*a(n - 22) + 22*a(n - 23) + 52*a(n - 24) + 38*a(n - 25) + 48*a(n - 26) + 22*a(n - 27) - 8*a(n - 28) - 2*a(n - 29) - 2*a(n - 31) - a(n - 32) - 2*a(n - 33) - a(n - 34).
%F G.f.: - (x^27 + x^26 + x^25 - x^24 + 4*x^22 + 4*x^21 - 16*x^20 - 23*x^19 - 29*x^18 + x^17 - 3*x^16 - 20*x^15 - 8*x^14 + 44*x^13 + 56*x^12 + 79*x^11 + 67*x^10 + 63*x^9 + 69*x^8 + 76*x^7 + 36*x^6 + 24*x^5 + 16*x^4 + 7*x^3 + x^2 - x - 1)/(x^34 + 2*x^33 + x^32 + 2*x^31 + 2*x^29 + 8*x^28 - 22*x^27 - 48*x^26 - 38*x^25 - 52*x^24 - 22*x^23 - 48*x^22 - 94*x^21 + 216*x^20 + 466*x^19 + 426*x^18 + 390*x^17 + 518*x^16 + 630*x^15 + 640*x^14 + 374*x^13 + 72*x^12 - 50*x^11 - 8*x^10 - 66*x^9 - 164*x^8 - 226*x^7 - 128*x^6 - 58*x^5 - 24*x^4 - 10*x^3 - 3*x^2 + 1).
%Y Cf. A002524..A002529, A072827, A072850..A072856, A079955..A080014.
%K nonn
%O 1,2
%A _Vladimir Baltic_, Jul 25 2002