Item 1.4.11.e.

How many ternary digit strings contain exactly \(n\) digits and \(n-k\) 2's.

in-context