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 A228313 #13 Mar 30 2020 04:18:39 %S A228313 0,1,8,3,21,54,8,48,120,256,15,85,210,440,750,27,144,351,720,1215, %T A228313 1944,42,217,525,1064,1785,2835,4116,64,320,768,1536,2560,4032,5824, %U A228313 8192,90,441,1053,2088,3465,5427,7812,10944,14580,125,600,1425,2800 %N A228313 Triangle read by rows: T(p,q) (1<=q<=p) is the Wiener index of the Cartesian product of the cycles C(p) and C(q) (the torus grid graph). %C A228313 T(n,n) = A122657(n). %C A228313 T(n,1) = A034828(n). %C A228313 T(n,2) = A138179(n) (n>=3). %H A228313 B. E. Sagan, Y-N. Yeh and P. Zhang, <a href="http://users.math.msu.edu/users/sagan/Papers/Old/wpg-pub.pdf">The Wiener Polynomial of a Graph</a>, Internat. J. of Quantum Chem., 60, 1996, 959-969. %F A228313 T(p,q) = pq(p+q)(pq - 1)/8 if both p and q are odd. %F A228313 T(p,q) = p^2*q^2*(p + q)/8 if both p and q are even. %F A228313 T(p,q) = pq^2*(p^2 - 1 + pq)/8 if p is odd and q is even. %F A228313 T(p,q) = p^2*q*(q^2 - 1 + pq)/8 if p is even and q is odd. %F A228313 The first Maple program makes use of the above formulas. %F A228313 The Hosoya-Wiener polynomial of C(p) X C(q) is 2*h(p)*h(q) + p*h(q) + q*h(p), where h(j) denotes the Hosoya-Wiener polynomial of the cycle C(j). %F A228313 The command H(p,q) in the 2nd Maple program yields the corresponding Hosoya-Wiener polynomial. %p A228313 Wi := proc (p, q) if `mod`(p, 2) = 1 and `mod`(q, 2) = 1 then (1/8)*p*q*(p+q)*(p*q-1) elif `mod`(p, 2) = 0 and `mod`(q, 2) = 0 then (1/8)*p^2*q^2*(p+q) elif `mod`(p, 2) = 1 and `mod`(q, 2) = 0 then (1/8)*p*q^2*(p^2+p*q-1) else (1/8)*p^2*q*(q^2+p*q-1) end if end proc: for i to 10 do seq(Wi(i, j), j = 1 .. i) end do; # yields sequence in triangular form %p A228313 H := proc (p, q) local br, h: br := proc (n) options operator, arrow: sum(t^k, k = 0 .. n-1) end proc: h := proc (m) if `mod`(m, 2) = 0 then m*(br((1/2)*m)-1)+(1/2)*m*t^((1/2)*m) else m*t*br((1/2)*m-1/2) end if end proc: sort(expand(2*h(p)*h(q)+p*h(q)+q*h(p))) end proc: Wi := proc (p, q) options operator, arrow: subs(t = 1, diff(H(p, q), t)) end proc: for i to 10 do seq(Wi(i, j), j = 1 .. i) end do; # yields sequence in triangular form %Y A228313 Cf. A122657, A034828, A138179, A228314 %K A228313 nonn,tabl %O A228313 1,3 %A A228313 _Emeric Deutsch_, Aug 25 2013