This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS 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: A326860 A013316 A013310 * A293567 A293494 A058803 Adjacent sequences:  A269886 A269887 A269888 * A269890 A269891 A269892 KEYWORD nonn AUTHOR Chris Wu, Mar 07 2016 STATUS approved

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

Last modified October 15 09:22 EDT 2019. Contains 328026 sequences. (Running on oeis4.)