%I #18 Jul 15 2024 16:36:30
%S 1,8,45,128,325,648,1225,2048,3321,5000,7381,10368,14365,19208,25425,
%T 32768,41905,52488,65341,80000,97461,117128,140185,165888,195625,
%U 228488,266085,307328,354061,405000,462241,524288,593505,668168,750925,839808,937765,1042568
%N Number of 2 X 2 matrices with all terms in {0,1,...,n} and even trace.
%H Chai Wah Wu, <a href="/A210378/b210378.txt">Table of n, a(n) for n = 0..10000</a>
%H <a href="/index/Rec#order_08">Index entries for linear recurrences with constant coefficients</a>, signature (2,2,-6,0,6,-2,-2,1).
%F a(n) + A210379(n) = (n+1)^4.
%F From _Chai Wah Wu_, Nov 27 2016: (Start)
%F a(n) = (n + 1)^2*((2*n + 1 -(-1)^n)^2 + (2*n + 3 + (-1)^n)^2)/16.
%F a(n) = 2*a(n-1) + 2*a(n-2) - 6*a(n-3) + 6*a(n-5) - 2*a(n-6) - 2*a(n-7) + a(n-8) for n > 7.
%F G.f.: (-x^6 - 6*x^5 - 27*x^4 - 28*x^3 - 27*x^2 - 6*x - 1)/((x - 1)^5*(x + 1)^3). (End)
%F From _Amiram Eldar_, Mar 15 2024: (Start)
%F a(n) = (n+1)^2*floor(((n+1)^2+1)/2).
%F Sum_{n>=0} 1/a(n) = Pi^4/720 + (Pi-2*tanh(Pi/2))*Pi/4. (End)
%F E.g.f.: ((2 + 15*x + 26*x^2 + 10*x^3 + x^4)*cosh(x) + (1 + 18*x + 25*x^2 + 10*x^3 + x^4)*sinh(x))/2. - _Stefano Spezia_, Jul 15 2024
%e Writing the matrices as 4-letter words, the 8 for n=1 are as follows:
%e 0000, 0100, 0010, 0110, 1001, 1101, 1011, 1111
%t a = 0; b = n; z1 = 35;
%t t[n_] := t[n] = Flatten[Table[w + z, {w, a, b}, {x, a, b}, {y, a, b}, {z, a, b}]]
%t c[n_, k_] := c[n, k] = Count[t[n], k]
%t u[n_] := Sum[c[n, 2 k], {k, 0, 2*n}]
%t v[n_] := Sum[c[n, 2 k - 1], {k, 1, 2*n - 1}]
%t Table[u[n], {n, 0, z1}] (* A210378 *)
%t Table[v[n], {n, 0, z1}] (* A210379 *)
%Y Cf. A210000, A210379.
%Y See A210000 for a guide to related sequences.
%K nonn,easy
%O 0,2
%A _Clark Kimberling_, Mar 20 2012