login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A354152 a(n) is the number of permutations pi in S_n such that pi(i) - i != 1 (mod n) and pi(i) - i != -1 (mod n) for all i. 2
1, 0, 1, 1, 4, 13, 82, 579, 4740, 43387, 439794, 4890741, 59216644, 775596313, 10927434466, 164806435783, 2649391469060, 45226435601207, 817056406224418, 15574618910994665, 312400218671253764, 6577618644576902053, 145051250421230224306, 3343382818203784146955 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

COMMENTS

For n > 1, this is the number of ways of rearranging guests sitting at a circular table such that a guest may stay in the same seat, but cannot move exactly one seat to their left or right.

The recurrence comes from Doron Zeilberger's MENAGE program, available via the arXiv reference.

LINKS

Peter Kagey, Table of n, a(n) for n = 0..400

D. Zeilberger, Automatic Enumeration of Generalized Menage Numbers, arXiv preprint arXiv:1401.1089 [math.CO], 2014.

FORMULA

a(n) = n*a(n-1) + 3*a(n-2) + (-2n+6)*a(n-3) - 3*a(n-4) + (n-6)*a(n-5) + a(n-6) for n > 8.

a(2k+1) = A000179(2k+1) for k > 1.

Conjecture: a(2k) = A000179(2k) + 2 for k > 1.

EXAMPLE

For n = 5, the a(5) = 13 permutations are 12345, 12543, 14325, 14523, 15342, 32145, 34125, 34512, 35142, 42315, 42513, 45123, and 45312.

The first letter is never 2 or 5, the second letter is never 1 or 3, the third letter is never 2 or 4, the fourth letter is never 3 or 5 and the fifth letter is never 1 or 4.

CROSSREFS

Cf. A000179, A341439, A354408.

Sequence in context: A301396 A221512 A061143 * A354409 A123333 A197752

Adjacent sequences:  A354149 A354150 A354151 * A354153 A354154 A354155

KEYWORD

nonn

AUTHOR

Peter Kagey, May 27 2022

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 15 17:39 EDT 2022. Contains 356148 sequences. (Running on oeis4.)