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 A143366 #12 Jun 09 2024 13:54:45 %S A143366 27,1002,7809,33204,101751,253758,549213,1071720,1932435,3274002, %T A143366 5274489,8151324,12165231,17624166,24887253,34368720,46541835, %U A143366 61942842,81174897,104912004,133902951,168975246,211039053,261091128,320218755 %N A143366 Wiener index of the hexagon crown (beehive model) with n hexagons on each side of the outside ring. %C A143366 The Wiener index of a connected graph G is the sum of distances between all pairs of vertices in G. %C A143366 The second Maple program finds and sums all the binomial(24,2) distances. %H A143366 Bo-Yin Yang and Yeong-Nan Yeh, <a href="https://doi.org/10.1111/j.0022-2526.2004.01516.x">A Crowning Moment for Wiener Indices</a>, Studies in Appl. Math., 112 (2004), 333-340. %H A143366 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (6, -15, 20, -15, 6, -1). %F A143366 a(n) = n(164n^4-30n^2+1)/5. %F A143366 G.f.: 3x(9+280x+734x^2+280x^3+9x^4)/(1-x)^6. [_R. J. Mathar_, Sep 05 2008] %e A143366 a(1)=27 because in the hexagon ABCDEF the binomial(6,2)=15 distances are AB=BC=CD=DE=EF=FA=1, AC=BD=CE=DF=EA=FB=2, AD=BE=CF=3 and their sum is 27. %p A143366 W:=proc(n) options operator, arrow: (164/5)*n^5-6*n^3+(1/5)*n end proc; seq(W(n),n=1..25); %p A143366 with(GraphTheory); G := Graph([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24], {{1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}, {7, 8}, {8, 9}, {9, 10}, {10, 11}, {11, 12}, {12, 13}, {13, 14}, {14, 15}, {15, 16}, {16, 17}, {17, 18}, {1, 18}, {2, 19}, {5, 20}, {8, 21}, {11, 22}, {14, 23}, {17, 24}, {19, 20}, {20, 21}, {21, 22}, {22, 23}, {23, 24}, {19, 24}}); d := AllPairsDistance(G); with(LinearAlgebra); n := 24; add(add(d[i, j], j = i .. n), i = 1 .. n); %t A143366 Table[n (164n^4-30n^2+1)/5,{n,30}] (* or *) LinearRecurrence[{6,-15,20,-15,6,-1},{27,1002,7809,33204,101751,253758},30] (* _Harvey P. Dale_, Jun 09 2024 *) %o A143366 (PARI) a(n) = n*(164*n^4-30*n^2+1)/5; \\ _Michel Marcus_, Jan 17 2019 %K A143366 nonn %O A143366 1,1 %A A143366 _Emeric Deutsch_, Sep 04 2008