This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A294198 #18 Feb 15 2018 08:13:39 %S A294198 0,0,3,12,120,1200,16380,255696,4726008,99107280,2346042600, %T A294198 61706210280,1788467429892,56618211155688,1944581982268380, %U A294198 72019509651227040,2861473883255362800,121414006972684901664,5479661140682410928592,262122044885503316203320 %N A294198 Labeled trees on n nodes with at least one node of degree two. %H A294198 Marko Riedel, <a href="/A294198/a294198.maple.txt">Maple code for sequence including total enumeration and closed form.</a> %H A294198 Marko Riedel et al., <a href="https://math.stackexchange.com/questions/2644294/">How many trees have a vertex of degree two</a> %F A294198 a(n) = (n-2)!*Sum_{q=1..n-2} C(n,q)*(-1)^(q+1)*(n-q)^(n-2-q)/(n-2-q)! where n >= 2. %e A294198 When n=4 there are two types of trees: paths (24!/2 trees) or a star (4 trees) for a total of 4^(4-2) trees. Of these only the paths contain a vertex of degree 2 (2 in fact). When n=5 there are three types of trees: paths (5!/2 trees), a star (5 trees) or a fork (C(5,1) x C(4, 2) x 2) for a total of 5^(5-2) trees. Of these only the paths and the fork contain a vertex of degree 2. %t A294198 a[1] = 0; a[n_] := (n-2)! Sum[Binomial[n, q] (-1)^(q+1) (n-q)^(n-2-q) / (n-2-q)!, {q, 1, n-2}]; Array[a, 20] (* _Jean-François Alcover_, Feb 15 2018 *) %Y A294198 Cf. A007106, A274699. %K A294198 nonn %O A294198 1,3 %A A294198 _Marko Riedel_, Feb 11 2018