login
A269889
The number of permutations of 1, 2,..., n such that none of 123, 132, 213, 231, 312, 321 appear in the permutation.
0
1, 1, 2, 0, 12, 84, 576, 4320, 36000, 332640, 3386880, 37739520, 457228800, 5987520000, 84304281600, 1270312243200, 20399720140800, 347841381888000, 6276836966400000, 119510975840256000, 2394487765942272000, 50361071569256448000, 1109403315728547840000
OFFSET
0,3
FORMULA
a(n) = n! - 6(n-2)! for n>=3.
-(n+1)*(n-4)*a(n) +(n-2)*(n-3)*(n+2)*a(n-1)=0 for n>=4 - R. J. Mathar, Nov 07 2017
EXAMPLE
There are 12 ways that permutations of 4 can have 1, 2, and 3 together. They are: 1234, 1324, 2134, 2314, 3124, 3214, 4123, 4132, 4213, 4231, 4312, 4321. Since there are 24 permutations, a(4) = 24-12 = 12
MATHEMATICA
Table[If[n < 3, n!, n! - 6 (n - 2)!], {n, 0, 22}] (* Michael De Vlieger, Mar 07 2016 *)
CROSSREFS
Cf. A000142.
Sequence in context: A013316 A353222 A013310 * A293567 A293494 A058803
KEYWORD
nonn
AUTHOR
Chris Wu, Mar 07 2016
STATUS
approved