%I #24 Oct 17 2022 15:57:50
%S 6,18,46,102,198,346,558,846,1222,1698,2286,2998,3846,4842,5998,7326,
%T 8838,10546,12462,14598,16966,19578,22446,25582,28998,32706,36718,
%U 41046,45702,50698,56046,61758,67846,74322,81198,88486,96198,104346,112942,121998
%N a(n) = 2*n^3 - 4*n^2 + 10*n - 2 (n>=1).
%C For n>=2, a(n) is the first Zagreb index of the graph KK_n, defined as 2 copies of the complete graph K_n, with one vertex from one copy joined to two vertices of the other copy (see the Stevanovic et al. reference, p. 396).
%C The first Zagreb index of a simple connected graph is the sum of the squared degrees of its vertices. Alternatively, it is the sum of the degree sums d(i) + d(j) over all edges ij of the graph.
%C The M-polynomial of KK_n is M(KK_n; x,y) = (n-2)^2*x^{n-1}*y^{n-1}+2*(n-2)*x^{n-1}*y^n + (n-1)*x^{n-1}*y^{n+1} + x^n*y^n +2*x^n*y^{n+1}.
%H Colin Barker, <a href="/A304161/b304161.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 D. Stevanovic, I. Stankovic, and M. Milosevic, <a href="http://match.pmf.kg.ac.rs/electronic_versions/Match61/n2/match61n2_395-401.pdf">More on the relation between energy and Laplacian energy of graphs</a>, MATCH Commun. Math. Comput. Chem. 61, 2009, 395-401.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%F a(n) = A033431(n-1) + A054000(n+1). - _Omar E. Pol_, May 09 2018
%F From _Colin Barker_, May 09 2018: (Start)
%F G.f.: 2*x*(3 - 3*x + 5*x^2 + x^3) / (1 - x)^4.
%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>4.
%F (End)
%t Table[2n^3-4n^2+10n-2 ,{n,50}] (* or *) LinearRecurrence[{4,-6,4,-1},{6,18,46,102},50] (* _Harvey P. Dale_, Oct 17 2022 *)
%o (PARI) Vec(2*x*(3 - 3*x + 5*x^2 + x^3) / (1 - x)^4 + O(x^60)) \\ _Colin Barker_, May 09 2018
%Y Cf. A033431, A054000.
%K nonn,easy
%O 1,1
%A _Emeric Deutsch_, May 09 2018
|