This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A143943 #13 Jul 21 2017 10:52:03 %S A143943 8,40,114,248,460,768,1190,1744,2448,3320,4378,5640,7124,8848,10830, %T A143943 13088,15640,18504,21698,25240,29148,33440,38134,43248,48800,54808, %U A143943 61290,68264,75748,83760,92318,101440,111144,121448,132370,143928 %N A143943 The Wiener index of a chain of n squares joined at vertices (i.e., joined like <><><>...<>; here <> is a square!). %C A143943 The Wiener index of a connected graph is the sum of distances between all unordered pairs of vertices in the graph. %H A143943 T. Mansour and M. Schork, <a href="https://doi.org/10.1007/s10910-009-9531-7">Wiener, hyper-Wiener, detour and hyper-detour indices of bridge and chain graphs</a>, J. Math. Chemistry, 47, 2010, 72-98 (see Example 5.6). %F A143943 a(n) = n*(2 + 3*n + 3*n^2). %F A143943 G.f.: 2*z*(2 + z)^2/(1 - z)^4. %F A143943 a(n) = Sum_{k=1..2*n} k*A143942(n,k). %e A143943 a(1)=8 because in the graph <> with vertices a,b,c,d we have 4 distances equal to 1 (the edges) and 2 distances equal to 2 (ac and bd); 4*1 + 2*2 = 8. %p A143943 seq(n*(2+3*n+3*n^2), n=1..40); %Y A143943 Cf. A143942. %K A143943 nonn %O A143943 1,1 %A A143943 _Emeric Deutsch_, Sep 06 2008