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 A143368 #31 Feb 16 2025 08:33:08 %S A143368 0,1,8,4,25,72,10,56,154,320,20,105,280,570,1000,35,176,459,920,1595, %T A143368 2520,56,273,700,1386,2380,3731,5488,84,400,1012,1984,3380,5264,7700, %U A143368 10752,120,561,1404,2730,4620,7155,10416,14484,19440 %N A143368 Triangle read by rows: T(n,k) is the Wiener index of a k X n grid (i.e., P_k X P_n, where P_m is the path graph on m vertices; 1 <= k <= n). %C A143368 The Wiener index of a connected graph is the sum of distances between all unordered pairs of vertices in the graph. %C A143368 This is the lower triangular half of a symmetric square array. %H A143368 Michael De Vlieger, <a href="/A143368/b143368.txt">Table of n, a(n) for n = 1..11325</a> (rows 1 <= n <= 150). %H A143368 A. Graovac and T. Pisanski, <a href="http://dx.doi.org/10.1007/BF01166923">On the Wiener index of a graph</a>, J. Math. Chem., 8 (1991), 53-62. %H A143368 B. E. Sagan, Y-N. Yeh and P. Zhang, <a href="http://dx.doi.org/10.1002/(SICI)1097-461X(1996)60:5<959::AID-QUA2>3.0.CO;2-W">The Wiener Polynomial of a Graph</a>, Internat. J. of Quantum Chem., 60, 1996, 959-969. %H A143368 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GridGraph.html">Grid Graph</a> %H A143368 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/WienerIndex.html">Wiener Index</a> %F A143368 T(n,k) = k*n*(n+k)*(k*n-1)/6 (k, n >= 1). %e A143368 Presentation as symmetric square array starts: %e A143368 ====================================================== %e A143368 n\k| 1 2 3 4 5 6 7 8 9 %e A143368 ---|-------------------------------------------------- %e A143368 1 | 0 1 4 10 20 35 56 84 120 ... %e A143368 2 | 1 8 25 56 105 176 273 400 561 ... %e A143368 3 | 4 25 72 154 280 459 700 1012 1404 ... %e A143368 4 | 10 56 154 320 570 920 1386 1984 2730 ... %e A143368 5 | 20 105 280 570 1000 1595 2380 3380 4620 ... %e A143368 6 | 35 176 459 920 1595 2520 3731 5264 7155 ... %e A143368 7 | 56 273 700 1386 2380 3731 5488 7700 10416 ... %e A143368 8 | 84 400 1012 1984 3380 5264 7700 10752 14484 ... %e A143368 9 | 120 561 1404 2730 4620 7155 10416 14484 19440 ... %e A143368 ... - _Andrew Howroyd_, May 27 2017 %e A143368 T(2,2)=8 because in a square we have four distances equal to 1 and two distances equal to 2. %e A143368 T(2,1)=1 because on the path graph on two vertices there is one distance equal to 1. %e A143368 T(3,2)=25 because on the P(2) X P(3) graph there are 7 distances equal to 1, 6 distances equal to 2 and 2 distances equal to 3, with 7*1 + 6*2 + 2*3 = 25. %e A143368 Triangle starts: 0; 1,8; 4,25,72; 10,56,154,320; %p A143368 T:=proc(n, k) options operator, arrow: (1/6)*k*n*(n+k)*(k*n-1) end proc: for n to 9 do seq(T(n,k),k=1..n) end do; # yields sequence in triangular form %t A143368 Table[k n (n + k) (k n - 1)/6, {n, 9}, {k, n}] // Flatten (* _Michael De Vlieger_, May 28 2017 *) %o A143368 (PARI) %o A143368 T(n,k)=k*n*(n+k)*(k*n-1)/6; %o A143368 for (n=1,8,for(k=1,8,print1(T(n,k),", "));print) \\ _Andrew Howroyd_, May 27 2017 %Y A143368 Cf. A180569 (row 3), A131423 (row 2). %Y A143368 Main diagonal is A143945. %Y A143368 Cf. A245826. %K A143368 nonn,tabl %O A143368 1,3 %A A143368 _Emeric Deutsch_, Sep 05 2008