Suppose that $k \le n$ . How many ordered sequence of integers $(a_1, a_2, ..., a_n)$ are there such that...

Suppose that $k \leq n$. How many ordered sequence of integers $(a_1, a_2,\ldots, a_k)$ are there such that $a_1, a_2, \ldots, a_k$ are elements of $\{1, 2,\ldots, n\}$ and $a_1, a_2,\ldots,a_k$ an contain only one identical pair?

Solution provided is $P(n, k-1) \cdot C(k, 2)$. I don't quite understand why is it $P(n, k-1)$. Shouldn't it be $P(n, k-2)$ instead since we're trying to select $k-2$ integers from the set $\{1, 2,\ldots, n\}$?

• Are you sure about the $C(k,2)$ part? I guess it must be $P(k,1)$. Because, firstly we select $k-1$ different numbers from $n$ numbers and after that we select one of them to repeat! The first step has $P(n,k-1)$ different ways to do and the second step has $k$ different ways, I guess. May 3, 2015 at 7:49

We supposed to have only one identical pair in $k$ numbers.So we have $k-1$ different numbers in our groups,right?
First, we have $P(n,k-1)$ ways to select $k-1$ different numbers from $n$ different numbers and after that we have $C(k,2)$ different states for selecting the paired number.