My combinatorics class is covering spanning trees right now and one of the questions being asked is "What is the number of labeled trees on n vertices with exactly $3$ vertices of degree $1$?"
I've tried a couple different ways of doing this and none of them seem to work. I tried examining the degree sequence, looking at the Prüfer code as words from an $[n-3]$ length alphabet, but it seems fruitless.
Any help would be greatly appreciated. Thanks!
Edit: I mis-read the problem, this was first posted with at least 3 vertices of degree 1, but the actual problem states exactly 3 vertices of degree 1.



Adding to Rebecca's answer: It is easier to consider the compositions of $n-1$ into three parts, which are the ordered partitions. Think of them being (in order) the length of each horizontal line. There are ${n-2 \choose 2}$ of these. Each of them can be labeled in $n!$ ways. Then (regardless of whether some lengths are the same) after the labeling, there are $6$ ways to show any given tree. So the total number is $\frac 16n!{n-2 \choose 2}=\frac 1{12}(n-2)(n-3)n!$