OFFSET
1,2
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.
Stephan Wagner, A class of trees and its Wiener index, Acta Applic. Mathem. 91 (2) (2006) 119-132.
FORMULA
W(n,p)=n*p*(2*n*p-n-p+1).
The Wiener polynomial of the graph G(n,p) is a*t+b*t^2+c*t^3+d*t^4, where a=n*p, b=(1/2)*n*(n+p^2-p-1), c=n*(n-1)*(p-1), d=(1/2)*n*(n-1)*(p-1)^2.
EXAMPLE
W(2,2)=20 because G(2,2) is the path graph with 4 edges; its Wiener index is 4*1+3*2+2*3+1*4=20.
The square array starts:
1,4,9,16,25,36,49,...;
4,20,48,88,140,204,280,...;
9,48,117,216,345,504,693,...;
16,88,216,400,640,936,1288,...;
MAPLE
W := proc (n, p) options operator, arrow; n*p*(2*n*p-n-p+1) end proc: for n to 11 do seq(W(n-i, i+1), i = 0 .. n-1) end do; # yields sequence in triangular form
W := proc (n, p) options operator, arrow; n*p*(2*n*p-n-p+1) end proc: for n to 7 do seq(W(n, p), p = 1 .. 10) end do; # yields the first 10 entries in each of the first 7 rows
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Jun 29 2011
STATUS
approved