A192025 The Wiener index of the double-comb graph \/\/\/...\/_\/ with 3n (n>=1) nodes. The Wiener index of a connected graph is the sum of the distances between all unordered pairs of vertices in the graph.
4, 29, 84, 178, 320, 519, 784, 1124, 1548, 2065, 2684, 3414, 4264, 5243, 6360, 7624, 9044, 10629, 12388, 14330, 16464, 18799, 21344, 24108, 27100, 30329, 33804, 37534, 41528, 45795, 50344, 55184, 60324, 65773, 71540, 77634, 84064, 90839, 97968, 105460
Offset: 1
Examples
a(2)=29 because in the graph \/_\/ there are 5 pairs of nodes at distance 1, 6 pairs at distance 2, and 4 pairs at distance 3 (5*1 + 6*2 + 4*3 = 29).
Links
- T. Mansour, M. Schork, The vertex PI index and Szeged index of bridge graphs, Discrete Appl. Math., 157, 2009, 1600-1606 (see last page).
- Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
Crossrefs
Cf. A192024
Programs
-
Maple
a := n -> (1/2)*n*(3*n^2+12*n-7): seq(a(n), n = 1 .. 40);
-
Mathematica
LinearRecurrence[{4,-6,4,-1},{4,29,84,178},40] (* Harvey P. Dale, Aug 07 2025 *)
Formula
a(n) = n*(3*n^2+12*n-7)/2.
G.f.: x*(4+13*x-8*x^2)/(1-x)^4.
Comments