OFFSET
1,2
COMMENTS
The Wiener index of a connected graph is the sum of distances between all unordered pairs of vertices in the graph.
LINKS
B. E. Sagan, Y-N. Yeh and P. Zhang, The Wiener Polynomial of a Graph, Internat. J. of Quantum Chem., 60, 1996, 959-969.
Eric Weisstein's World of Mathematics, Fan Graph.
FORMULA
EXAMPLE
T(2,3)=12 because the corresponding fan graph is the wheel graph on 5 nodes OABCD, O being the center of the wheel. Its Wiener index = number of edges + |AC| +|BD| = 8+2+2=12.
Square array T(p,n) begins:
1, 3, 7, 13, 21, 31, 43,...
4, 7, 12, 19, 28, 39, 52, ...
9, 13, 19, 27, 37, 49, 63,...
16, 21, 28, 37, 48, 61, 76, ...
MAPLE
T := proc (p, n) options operator, arrow: p*(p-1)+(n-1)^2+p*n end proc: for i to 12 do seq(T(i+1-j, j), j = 1 .. i) end do; # yields sequence in triangular form
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Sep 24 2010
STATUS
approved