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 6 consecutive elements having their maximum within 6 of their minimum.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
Michael A. Allen, Combinations without specified separations, Communications in Combinatorics and Optimization (in press).
Michael A. Allen, Connections between Combinations Without Specified Separations and Strongly Restricted Permutations, Compositions, and Bit Strings, arXiv:2409.00624 [math.CO], 2024.
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,1,-2,4,-2,0,2,-2,4,-3,1,0,-2,1,-1).
FORMULA
G.f.: (1 + x + x^2 + 2*x^3 + 2*x^4 + 2*x^5 + 5*x^6 + 3*x^8 + 2*x^9 - x^10 + x^11 - 4*x^12 - x^13 - 2*x^14 - 2*x^15 - x^17)/(1 - x - x^4 - x^5 + 2*x^6 - 4*x^7 + 2*x^8 - 2*x^10 + 2*x^11 - 4*x^12 + 3*x^13 - x^14 + 2*x^16 - x^17 + x^18).
a(n) = a(n-1) + a(n-4) + a(n-5) - 2*a(n-6) + 4*a(n-7) - 2*a(n-8) + 2*a(n-10) - 2*a(n-11) + 4*a(n-12) - 3*a(n-13) + a(n-14) - 2*a(n-16) + a(n-17) - a(n-18) for n >= 18.
EXAMPLE
For n = 7, the 29 subsets are {}, {1}, {2}, {3}, {1,3}, {4}, {1,4}, {2,4}, {5}, {1,5}, {2,5}, {3,5}, {1,3,5}, {6}, {1,6}, {2,6}, {3,6}, {1,3,6}, {4,6}, {1,4,6}, {2,4,6}, {7}, {2,7}, {3,7}, {4,7}, {2,4,7}, {5,7}, {2,5,7}, {3,5,7}.
MATHEMATICA
CoefficientList[Series[(1 + x + x^2 + 2*x^3 + 2*x^4 + 2*x^5 + 5*x^6 + 3*x^8 + 2*x^9 - x^10 + x^11 - 4*x^12 - x^13 - 2*x^14 - 2*x^15 - x^17)/(1 - x - x^4 - x^5 + 2*x^6 - 4*x^7 + 2*x^8 - 2*x^10 + 2*x^11 - 4*x^12 + 3*x^13 - x^14 + 2*x^16 - x^17 + x^18), {x, 0, 41}], x]
LinearRecurrence[{1, 0, 0, 1, 1, -2, 4, -2, 0, 2, -2, 4, -3, 1, 0, -2, 1, -1}, {1, 2, 3, 5, 8, 13, 21, 29, 45, 66, 99, 148, 218, 337, 497, 755, 1131, 1699}, 42]
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Michael A. Allen, Jul 11 2025
STATUS
approved
