Formula for permutations with repetition. The number of distinct sequences with ni objects of type 1, n2 objects of type 2, ..., Nk objects of type k, where n = n1 + n2+ ... + nk is n! ni! n2! nk! How many ways are there to permute the letters in PEPPERS?