OFFSET
0,14
COMMENTS
a(n) is the number of permutations (p(1), p(2), ..., p(n)) satisfying -k <= p(i)-i <= r and p(i)-i in the set I, i=1..n, with k=2, r=12, I={-2,0,12}.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Vladimir Baltic, On the number of certain types of strongly restricted permutations, Applicable Analysis and Discrete Mathematics Vol. 4, No 1 (April, 2010), 119-13
Index entries for linear recurrences with constant coefficients, signature (1, 0, 0, 0, 0, 0, 1, -1, 1, -1, 1, -1, 1, 3, -2, 2, -1, 1, 0, 0, -3, 2, -4, 2, -3, 0, 0, -3, 1, -2, 0, 0, 0, 0, 3, -1, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, -1).
FORMULA
a(n) = a(n-1) +a(n-7) -a(n-8) +a(n-9) -a(n-10) +a(n-11) -a(n-12) +a(n-13) +3*a(n-14) -2*a(n-15) +2*a(n-16) -a(n-17) +a(n-18) -3*a(n-21) +2*a(n-22) -4*a(n-23) +2*a(n-24) -3*a(n-25) -3*a(n-28) +a(n-29) -2*a(n-30) +3*a(n-35) -a(n-36) +3*a(n-37) +a(n-42) -a(n-49).
G.f.: -(-1 +x^7 +x^9 +x^11 +2*x^14 +x^16 -2*x^21 -2*x^23 -x^28 +x^35)/( (x^7+x-1) *(x^42 -x^36 -2*x^30 -3*x^28 +2*x^24 +2*x^22 +x^18 +2*x^16 +3*x^14 -x^12 -x^10 -x^8 -1) ).
MATHEMATICA
CoefficientList[Series[-(-1 + x^7 + x^9 + x^11 + 2*x^14 + x^16 - 2*x^21 - 2*x^23 - x^28 + x^35)/((x^7 + x - 1)*(x^42 - x^36 - 2*x^30 - 3*x^28 + 2*x^24 + 2*x^22 + x^18 + 2*x^16 + 3*x^14 - x^12 - x^10 - x^8 - 1)), {x, 0, 1000}], x] (* G. C. Greubel, Oct 28 2017 *)
PROG
(PARI) x='x+O('x^50); Vec(-(-1 + x^7 + x^9 + x^11 + 2*x^14 + x^16 - 2*x^21 - 2*x^23 - x^28 + x^35)/((x^7 + x - 1)*(x^42 - x^36 - 2*x^30 - 3*x^28 + 2*x^24 + 2*x^22 + x^18 + 2*x^16 + 3*x^14 - x^12 - x^10 - x^8 - 1))) \\ G. C. Greubel, Oct 28 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Baltic, May 18 2013
STATUS
approved