For n>=2, a(n) is the second 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).
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.
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).