There are (k+1) numbers mod 3 = 1, k numbers mod 3 = 0 and k numbers mod 3 = 2. The first number has to be mod1 type. Then k mod0 types can appear anywhere in 3*k slots. Then the mod1 types and mod2 types have to alternate with mod1 types appear first.
A3: (C(3*k,k)*(k!)*(k!)*((k+1)!))/(3*k=1)!
本帖于 2007-12-11 07:04:32 时间, 由普通用户 康MM 编辑