Simple Probability Question ?



If I have the set of objects

ABCD,

the number of combinations if we choose 3 is 4c3, or 4! / (3!* 1!)

The number of permutations is: 4!

If instead the set was:
AABBCD,

the number of combinations if we choose 3 is: 6! / (3! * 3! * 2! *
2!)
...divide by 2! for each of the repeats.

But what is the number of 3-length permutations?
I mean, the answer possible ones are:
AAB,AAC,AAD,ABA,ABB,ABC,ABD,ACA,ACB,ACD,ADA,ADB,ADC,
BAA,BAB,BAC,BAD,BBA,BBC,BBD,BCA,BCB,BCD,BDA,BDB,BDC,
CAA,CAB,CAD,CBA,CBB,CBD,CDA,CDB
DAA,DAB,DAC,DBA,DBB,DBC,DCA,DCB

so, 42, but what is the formula for the general case ?

Thanks!

.