This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A279905 #33 Aug 18 2025 18:48:13 %S A279905 0,0,0,16,72,216,480,960,1680,2800,4320,6480,9240,12936,17472,23296, %T A279905 30240,38880,48960,61200,75240,91960,110880,133056,157872,186576, %U A279905 218400,254800,294840,340200,389760,445440,505920,573376,646272,727056,813960,909720 %N A279905 Number of 2 X 2 matrices with entries in {0,1,...,n} and odd trace with no elements repeated. %H A279905 Indranil Ghosh, <a href="/A279905/b279905.txt">Table of n, a(n) for n = 0..1000</a> %H A279905 <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 A279905 a(n) = ((n-2)*(n-1)*(2*(n+1)^2-(-1)^n-1))/4 for n>=0 . %F A279905 From _Colin Barker_, Dec 26 2016: (Start) %F A279905 a(n) = (n^4 - n^3 - 4*n^2 + 4*n)/2 for n even. %F A279905 a(n) = (n^4 - n^3 - 3*n^2 + n + 2)/2 for n odd. %F A279905 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 A279905 G.f.: 8*x^3*(2 + 5*x + 5*x^2) / ((1 - x)^5*(1 + x)^3). %F A279905 (End) %F A279905 E.g.f.: (1/4)*((-2 - 2*x - x^2)*exp(-x) + (2 -2*x + x^2 + 10*x^3 + 2*x^4 )*exp(x)). - _G. C. Greubel_, Dec 26 2016 %t A279905 LinearRecurrence[{2,2,-6,0,6,-2,-2,1}, {0,0,0,16,72,216,480,960}, 50] (* _G. C. Greubel_, Dec 26 2016 *) %o A279905 (Python) %o A279905 def a(n): %o A279905 s=0 %o A279905 for a in range(0,n+1): %o A279905 for b in range(0,n+1): %o A279905 if a!=b: %o A279905 for c in range(0,n+1): %o A279905 if a!=c and b!=c: %o A279905 for d in range(0,n+1): %o A279905 if d!=a and d!=b and d!=c: %o A279905 if (a+d)%2==1: %o A279905 s+=1 %o A279905 return s %o A279905 print([a(n) for n in range(41)]) %o A279905 (Python) %o A279905 def a(n): %o A279905 return ((n-3)*(n-2)*(2*n**2+(-1)**n-1))//4 %o A279905 (PARI) concat(vector(3), Vec(8*x^3*(2 + 5*x + 5*x^2) / ((1 - x)^5*(1 + x)^3) + O(x^50))) \\ _Colin Barker_, Dec 26 2016 %o A279905 (PARI) concat([0,0,0], Vec(8*x^3*(2 + 5*x + 5*x^2) / ((1 - x)^5*(1 + x)^3) + O(x^50))) \\ _G. C. Greubel_, Dec 26 2016 %Y A279905 Cf. A210379 (where all elements can be repeated). %K A279905 nonn,easy %O A279905 0,4 %A A279905 _Indranil Ghosh_, Dec 26 2016