%I #2 Mar 30 2012 17:36:24
%S 8,16,17,26,29,31,42,43,48,51,61,64,67,74,78,88,88,94,99,108,113,119,
%T 121,124,133,140,151,157,160,158,164,170,182,191,204,211,206,206,208,
%U 218,227,242,253,268,276,264,259,264,270,284,296,314,327,344,353,328
%N Square array read by antidiagonals: T(m,n) is the Wiener index of the tadpole graph L(m,n) (m>=3, n>=1). L(m,n) is the graph obtained by joining with an edge a node in the cycle graph C_m to an end-node of the path graph P_n. The Wiener index of a connected graph is the sum of distances between all unordered pairs of vertices in the graph.
%C Tadpole graphs are also called keys (see the Gross & Yellen reference, p. 895).
%C T(m,1)=A180861(m).
%D J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TadpoleGraph.html">Tadpole Graph</a>.
%F T(2m,n)=m^3+(1/6)n(n^2-1)+mn(m+n+1).
%F T(2m+1,n)=(1/2)m(m+1)(2m+1)+(1/6)n(n+1)(n+2)+mn(m+n+2).
%e T(3,1)=8 because the graph consists of a triangle ABCA and an edge AD; the distances are d(A,B)=d(B,C)=d(C,A)=d(A,D)=1 and d(DB)=d(DC)=2.
%e Square array T(i,j) begins:
%e 8,17,31,51,78,...
%e 16,29,48,74,108,...
%e 26,43,67,99,140,...
%e 42,64,94,133,182,...
%p T := proc (m, n) if `mod`(m, 2) = 0 then (1/8)*m^3+(1/6)*n*(n^2-1)+(1/4)*m*n*(m+2*n+2) else (1/8)*m*(m^2-1)+(1/6)*n*(n+1)*(n+2)+(1/4)*n*(m-1)*(m+2*n+3) end if end proc: for n from 3 to 13 do seq(T(n+1-i, i), i = 1 .. n-2) end do; # yields sequence in triangular form
%Y Cf. A180861
%K nonn,tabl
%O 3,1
%A _Emeric Deutsch_, Sep 27 2010
|