OFFSET
1,3
COMMENTS
LINKS
Reinhard Zumkeller, Rows n = 1..125 of triangle, flattened
S. Klavzar, A. Rajapakse, I. Gutman, The Szeged and the Wiener index of graphs, Appl. Math. Lett., 9, 1996, 45-49.
FORMULA
T(m,n) = mn(2m^2 n^2 - m^2 - n^2)/6. See the Klavzar et al. reference; p. 47, line 6; there is a typo: n^2 - m^2 should be n^2 + m^2.
EXAMPLE
T(2,2) = 16 because P_2 X P_2 is the square C_4 and each of its 4 edges contributes 2*2=4 to its Szeged index.
Triangle starts:
0;
1,16;
4,59,216;
10,144,526,1280;
20,285,1040,2530,5000;
MAPLE
T:=proc(m, n) options operator, arrow: (1/6)*m*n*(2*m^2*n^2-m^2-n^2) end proc: for m to 12 do seq(T(m, n), n = 1 .. m) end do; # yields sequence in triangular form
MATHEMATICA
T[m_, n_] := (1/6)*m*n*(2*m^2*n^2 - m^2 - n^2); Table[T[m, n], {m, 1, 12}, {n, 1, m}] // Flatten (* Jean-François Alcover, Feb 09 2018 *)
PROG
(Haskell)
a245826 n k = n * k * (2 * n^2 * k^2 - n^2 - k^2) `div` 6
a245826_row n = map (a245826 n) [1..n]
a245826_tabl = map a245826_row [1..]
-- Reinhard Zumkeller, Aug 07 2014
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Aug 06 2014
STATUS
approved