%I #60 Sep 08 2022 08:46:23
%S 0,0,5,6,68,50,333,196,1040,540,2525,1210,5220,2366,9653,4200,16448,
%T 6936,26325,10830,40100,16170,58685,23276,83088,32500,114413,44226,
%U 153860,58870,202725,76880,262400,98736,334373,124950,420228,156066,521645,192660,640400,235340
%N a(n) = (1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*(n mod 2)).
%C Conjectures: (Start)
%C For n > 1, a(n) is the absolute value of the trace of the 2nd exterior power of an n X n square matrix M(n) defined as M[i,j,n] = j + n*(i-1) if i is odd and M[i,j,n] = n*i - j + 1 if i is even (see A317614). Equivalently, a(n) is the absolute value of the coefficient of the term [x^(n-2)] in the characteristic polynomial of the matrix M(n), or the absolute value of the sum of all principal minors of M(n) of size 2.
%C For k > 2, the trace of the k-th exterior power of the matrix M(n) is equal to zero.
%C (End)
%H Stefano Spezia, <a href="/A322844/b322844.txt">Table of n, a(n) for n = 0..10000</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Characteristic_polynomial">Characteristic polynomial</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Exterior_algebra">Exterior algebra</a>
%F O.g.f.: -x^2*(5 + 6*x + 43*x^2 + 20*x^3 + 43*x^4 + 6*x^5 + 5*x^6)/((-1 + x)^5*(1 + x)^5)).
%F E.g.f.: (1/(12*x^2))*exp(-x)*(24 - 60*exp(x) + 21*x + 9*x^2 + 2*x^3 + x^4 + exp(2*x)*(36 - 33*x + 15*x^2 - 4*x^3 + 2*x^4)).
%F a(n) = (1/4)*n^2*(1 + n^2) for n even.
%F a(n) = (1/2)*A037270(n) for n even.
%F a(n) = (1/12)*(-1 + n)*n^2*(1 + n) for n odd.
%F a(n) = A002415(n) for n odd.
%F a(2*n+1) = 5*a(2*n-1) - 10*a(2*n-3) + 10*a(2*n-5) - 5*a(2*n-7) + a(2*n-9), for n > 4.
%F a(2*n) = 5*a(2*n-2) - 10*a(2*n-4) + 10*a(2*n-6) - 5*a(2*n-8) + a(2*n-10), for n > 4.
%F O.g.f. for a(2*n+1): -x*(2*(3 + 10*x + 3*x^2))/(-1 + x)^5.
%F O.g.f. for a(2*n): x*(-5 - 43*x - 43*x^2 - 5*x^3)/(-1 + x)^5.
%F E.g.f. for a(2*n+1): (1/12)*(6*x*cosh(sqrt(x)) + sqrt(x)*(6 + x)*sinh(sqrt(x))).
%F E.g.f. for a(2*n): (1/4)*(x*(8 + x)*cosh(sqrt(x)) + 2*sqrt(x)*(1 + 3*x)*sinh(sqrt(x))).
%F Sum_{k>=1} 1/a(2*k) = (1/6)*(12 + Pi^2 - 6*Pi*coth(Pi/2)) = 0.21955691692893092525407699347398665248691900...
%F Sum_{k>=1} 1/a(2*k+1) = 3*(5 - Pi^2/2) = 0.1955933983659620717482635001857732970...
%F Sum_{k>=2} 1/a(k) = 17 - (4*Pi^2)/3 - Pi*coth(Pi/2) = 0.415150315294892997002340493659759949516369894...
%p a:=n->(1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*modp(n,2)): seq(a(n), n=0..50);
%t a[n_]:=(1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*Mod[n,2]); Array[a,50,0]
%o (GAP) Flat(List([0..50], n->(1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*(n mod 2))));
%o (Magma) [IsEven(n) select (1/4)*n^2*(1 + n^2) else (1/12)*(- 1 + n)*n^2*(1 + n): n in [0..50]];
%o (Maxima) a(n):=(1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*mod(n,2))$ makelist(a(n), n, 0, 50);
%o (PARI) a(n) = (1/12)*n^2*(3*(1 + n^2) - 2*(2 + n^2)*(n % 2));
%o (PARI) a(n) = abs(polcoeff(charpoly(matrix(n, n, i, j, if (i %2, j + n*(i-1), n*i - j + 1))), n-2)); \\ _Michel Marcus_, Feb 06 2019
%o (Python) [int(n**2*(3*(1 + n**2) - 2*(2 + n**2)*pow(n, 1, 2))/12) for n in range(0,50)]
%Y Cf. A317614 (trace of matrix M(n)).
%Y Cf. A002415, A037270, A074147 (antidiagonals of M matrices), A241016 (row sums of M matrices), A317617 (column sums of M matrices), A322277 (permanent of matrix M(n)), A323723 (subdiagonal sum of M matrices), A323724 (superdiagonal sum of M matrices), A325516 (k-superdiagonal sum of M matrices), A325655 (k-subdiagonal sum of M matrices).
%K nonn,easy
%O 0,3
%A _Stefano Spezia_, Dec 28 2018