For instance, for N=2, the answer is 6 (e.g. aabb, abab abba baab baba bbaa). For N=3, the answer is 1680. I'm looking for the proper formula. Thanks
2026-04-14 03:31:15.1776137475
How many sequences of length N squared can be formed with N different values where each value is used exactly N times?
42 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
The answer is $$\frac{(n^2)!}{(n!)^n}$$ This is the number of ways to divide a set of $n^2$ elements into $n$ subsets. It's the number of permutations of $n^2$ different elements, divided by the number of ways to permute the identical elements without changing the permutation.