This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A266393 Number of permutations of n letters that contain exactly 3 distinguishable A's, 2 distinguishable B's and n-5 distinguishable other letters, where no A's are adjacent and no B's are adjacent. 1
 12, 120, 1152, 11520, 122400, 1391040, 16934400, 220631040, 3069964800, 45505152000, 716586393600, 11955879936000, 210797108121600, 3917792406528000, 76577410990080000, 1570715682471936000, 33740509429186560000 (list; graph; refs; listen; history; text; internal format)
 OFFSET 5,1 LINKS FORMULA a(n) = (n-3)! * (n^3 - 11*n^2 + 44*n - 64). EXAMPLE For n=5, our base letter sequence is "AAABB". In its 120 permutations (5! = 120), there are 12 instances of "ABABA", the only letter sequence where neither A's nor B's are adjacent to themselves. This can be represented visually by using upper and lower case, and a diacritic in the case of the third "A": ABabá, AbaBá, aBAbá, abABá, áBAba, ábABa, ABába, AbáBa, aBábA, abáBA, áBabA, and ábaBA. For n=6, the base sequence is "AAABBC", which has 720 (6!) permutations. There are similarly 12 instances of each of the 10 letter sequences that don't duplicate A's or B's, namely ABABAC, ABABCA, ABACAB, ABACBA, ABCABA, ACABAB, ACBABA, BABACA, BACABA, and CABABA, making 120 distinguishable permutations that fit this rule. MAPLE A266393:=n->(n-3)!*(n^3 - 11*n^2 + 44*n - 64): seq(A266393(n), n=5..25); # Wesley Ivan Hurt, Jan 01 2016 MATHEMATICA Table[(n - 3)!*(n^3 - 11*n^2 + 44*n - 64), {n, 5, 30}] (* Wesley Ivan Hurt, Jan 01 2016 *) PROG (MAGMA) [Factorial(n-3)*(n^3 - 11*n^2 + 44*n - 64) : n in [5..30]]; // Wesley Ivan Hurt, Jan 01 2016 CROSSREFS Sequence in context: A277491 A004332 A129329 * A129332 A004291 A001754 Adjacent sequences:  A266390 A266391 A266392 * A266394 A266395 A266396 KEYWORD nonn,easy AUTHOR Curtis Autery, Dec 28 2015 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 07:56 EDT 2019. Contains 328026 sequences. (Running on oeis4.)