login
A182491
T(n,k), a triangular array read by rows, is the Wiener index for the complete bipartite graph K(n,k).
2
1, 4, 8, 9, 14, 21, 16, 22, 30, 40, 25, 32, 41, 52, 65, 36, 44, 54, 66, 80, 96, 49, 58, 69, 82, 97, 114, 133, 64, 74, 86, 100, 116, 134, 154, 176, 81, 92, 105, 120, 137, 156, 177, 200, 225, 100, 112, 126, 142, 160, 180, 202, 226, 252, 280, 121, 134, 149, 166, 185, 206, 229, 254, 281, 310, 341
OFFSET
1,2
COMMENTS
T(n,1) = A000290 (star graphs).
T(n,n) = A000567.
LINKS
Indranil Ghosh, Rows 1..100, flattened
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, Wiener Index
FORMULA
T(n,k) = n*k + n*(n-1) + k*(k-1).
G.f.: x*y*(x+y+2*x*y^2+2*x^2*y-7*x*y+1)/((1-x)^3*(1-y)^3). - R. J. Mathar, Nov 27 2015
EXAMPLE
Triangle of terms:
1
4 8
9 14 21
16 22 30 40
25 32 41 52 65
36 44 54 66 80 96
T(2,1)=4. Indeed, K(2,1) is the graph in the shape of a V and the Wiener index is 2*1 + 2 = 4. - Emeric Deutsch, Aug 25 2013
MAPLE
Wi := proc (m, n) options operator, arrow: (m+n)^2-m*n-m-n end proc: for m to 10 do seq(Wi(m, n), n = 1 .. m) end do; # yields sequence in triangular form; Emeric Deutsch, Aug 25 2013
MATHEMATICA
Table[Table[3n^2-2*n+(m-n)3n + 2*Binomial[m-n, 2], {n, 1, m}], {m, 1, 20}]//Grid
(* Second program *)
Table[SeriesCoefficient[x y (x + y + 2 x y^2 + 2 x^2*y - 7 x y + 1)/((1 - x)^3*(1 - y)^3), {x, 0, n}, {y, 0, k}], {n, 11}, {k, n}] // Flatten (* Michael De Vlieger, Feb 24 2017 *)
PROG
(Python)
i=1
for n in range(1, 101):
....for k in range(1, n+1):
........print str(i)+" "+str(n*k + n*(n-1) + k*(k-1))
........i+=1 # Indranil Ghosh, Feb 24 2017
CROSSREFS
Sequence in context: A312830 A312831 A085711 * A281686 A122785 A280450
KEYWORD
nonn,tabl,easy
AUTHOR
Geoffrey Critzer, Patrick Cuddy, May 02 2012
STATUS
approved