OFFSET
3,1
COMMENTS
A broom on 2n vertices is a caterpillar that is obtained by adding n pendant vertices to the first (or last) internal vertex of a path on n >= 3 vertices.
LINKS
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = 2n^3/3 + n^2/2 + 5n/6.
EXAMPLE
For n=3 the value a(3)=25 gives the Wiener index of a star graph on 6 vertices. For n=4, a(4)=54 gives the Wiener index of a broom graph on 8 vertices (6 of which are leaves).
* *
\ /
*__ \*/___*___*
/ \
/ \
* *
MATHEMATICA
nterms=50; Table[2n^3/3+n^2/2+5n/6, {n, 3, nterms+2}] (* Paolo Xausa, Nov 22 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Julian Allagan, Nov 16 2021
STATUS
approved