%I #21 Feb 16 2025 08:33:54
%S 84,24,476,1440,2916,4904,7404,10416,13940,17976,22524,27584,33156,
%T 39240,45836,52944,60564,68696,77340,86496,96164,106344,117036,128240,
%U 139956,152184,164924,178176,191940,206216,221004,236304,252116,268440,285276,302624,320484,338856,357740,377136
%N a(n) = 256n^2 - 828n + 656 (n>=1).
%C a(n) is the second Zagreb index of the King graph K(n,n) (n>=3). The second Zagreb index of a simple connected graph is the sum of the degree products d(i)d(j) over all edges ij of the graph.
%C The M-polynomial of the King graph K(n,n) is M(K(n,n); x,y) = 8x^3*y^5 + 4x^3 *y^8 + 4(n - 2)x^5*y^5 + 4(3n - 8)x^5*y^8 + 2(n-3)(2n-5)x^8*y^8.
%C More generally, the M-polynomial of the King graph K(m,n) is M(K(m,n); x,y) = 8x^3*y^5 + 4x^3 *y^8 + 2(m + n - 4)x^5*y^5 + 2(3m + 3n - 16)x^5*y^8 + (4mn - 11m -11n + 30)x^8*y^8.
%H Colin Barker, <a href="/A304379/b304379.txt">Table of n, a(n) for n = 1..1000</a>
%H E. Deutsch and Sandi Klavzar, <a href="http://dx.doi.org/10.22052/ijmc.2015.10106">M-polynomial and degree-based topological indices</a>, Iranian J. Math. Chemistry, 6, No. 2, 2015, 93-102.
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/KingGraph.html">King Graph</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (3,-3,1).
%F From _Colin Barker_, May 18 2018: (Start)
%F G.f.: 4*x*(21 - 57*x + 164*x^2) / (1 - x)^3.
%F a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>3.
%F (End)
%p seq(256*n^2 - 828*n + 656, n=1..40);
%o (PARI) Vec(4*x*(21 - 57*x + 164*x^2) / (1 - x)^3 + O(x^40)) \\ _Colin Barker_, May 18 2018
%o (GAP) List([1..40], n->256*n^2-828*n+656); # _Muniru A Asiru_, May 22 2018
%Y Cf. A304378.
%K nonn,easy,changed
%O 1,1
%A _Emeric Deutsch_, May 12 2018