OFFSET
0,2
COMMENTS
a(n) is the number of permutations of 0..n with each element moved by -1 to 1 places and every 5 consecutive elements having their maximum within 5 of their minimum.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,1,1,1,-1,1,1,1,0,1).
FORMULA
a(n) = a(n-2) + a(n-3) + a(n-4) - a(n-5) + a(n-6) + a(n-7) + a(n-8) + a(n-10) for n >= 10.
G.f.: (1 + 2*x + 2*x^2 + 2*x^3 + 2*x^4 + 4*x^5 + 3*x^6 + 2*x^7 + x^8 + x^9)/(1 - x^2 - x^3 - x^4 + x^5 - x^6 - x^7 - x^8 - x^10).
EXAMPLE
For n = 6, the 18 subsets are {}, {1}, {2}, {3}, {4}, {5}, {6}, {1,3}, {1,4}, {1,5}, {2,4}, {2,5}, {2,6}, {3,5}, {3,6}, {4,6}, {1,3,5}, {2,4,6}.
MATHEMATICA
CoefficientList[Series[(1 + 2*x + 2*x^2 + 2*x^3 + 2*x^4 + 4*x^5 + 3*x^6 + 2*x^7 + x^8 + x^9)/(1 - x^2 - x^3 - x^4 + x^5 - x^6 - x^7 - x^8 - x^10), {x, 0, 41}], x]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Michael A. Allen, Jul 18 2024
STATUS
approved