Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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
OFFSET
5,1
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
KEYWORD
nonn,easy
AUTHOR
Curtis Autery, Dec 28 2015
STATUS
approved