OFFSET
2,2
COMMENTS
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, Windmill Graph.
FORMULA
T(m,n) = (1/2)n(m-1)((m-1)(2n-1)+1).
The Wiener polynomial of D(m,n) is (1/2)n(m-1)t((m-1)(n-1)t+m).
EXAMPLE
T(3,2)=14 because the graph D(3,2) consists of two triangles OAB and OCD with a common node O; it has 6 distances equal to 1 (the edges) and 4 distances equal to 2 (AC, AD, BC, and BD); 6 * 1 + 4 * 2 = 14.
Square array starts:
1, 4, 9, 16, 25, ...
3, 14, 33, 60, 95, ...
6, 30, 72, 132, 210, ...
10, 52, 126, 232, 370, ...
MAPLE
T := proc (m, n) options operator, arrow: (1/2)*n*(m-1)*((m-1)*(2*n-1)+1) end proc: for p from 2 to 12 do seq(T(p+1-j, j), j = 1 .. p-1) end do; # yields sequence in triangular form
PROG
(PARI) T(m, n) = (1/2)*n*(m-1)*((m-1)*(2*n-1)+1);
antidiag(n) = vector(n-1, k, k; T(n-k+1, k)); \\ Michel Marcus, Mar 09 2023
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Sep 25 2010
STATUS
approved