Q:

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\}$?

A:

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.

