cp's OEIS Frontend

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.

A366448 Number of distinct characteristic polynomials for 2 X 2 matrices with entries from {0, 1, ..., n}.

This page as a plain text file.
%I A366448 #38 May 08 2025 21:28:49
%S A366448 1,6,22,58,116,221,356,573,824,1163,1565,2143,2697,3527,4385,5388,
%T A366448 6455,7992,9342,11262,12953,15034,17301,20246,22595,25823,29054,32679,
%U A366448 36228,41112,44964,50600,55288,60770,66543,72927,78173,86577,93925,101775,108798
%N A366448 Number of distinct characteristic polynomials for 2 X 2 matrices with entries from {0, 1, ..., n}.
%H A366448 Robin Visser, <a href="/A366448/b366448.txt">Table of n, a(n) for n = 0..1000</a> (terms n = 0..149 from Robert P. P. McKone).
%H A366448 Robert P. P. McKone, <a href="/A366448/a366448_1.txt">The distinct characteristic polynomials for a(0)-a(23)</a>.
%F A366448 a(n) <= A058331(n) * A005408(n) = 4*n^3 + 2*n^2 + 2*n + 1.
%F A366448 A058331(n) = 2*n^2 + 1 <= a(n). - _Charles R Greathouse IV_, May 08 2025
%e A366448 For n = 1 the a(1) = 6 characteristic polynomials are {x^2, -4 + x^2, -2 + x^2, -1 + x^2, -4*x + x^2, 2-4*x + x^2}.
%t A366448 mat[n_Integer?Positive]:=mat[n]=Array[m,{n,n}]; flatMat[n_Integer?Positive]:=flatMat[n]=Flatten[mat[n]]; charPolyMat[n_Integer?Positive]:=charPolyMat[n]=FullSimplify[CoefficientList[Expand[CharacteristicPolynomial[mat[n],x]],x]]; a[d_Integer?Positive,0]=1; a[d_Integer?Positive,n_Integer?Positive]:=a[d,n]=Length[DeleteDuplicates[Flatten[Table[Evaluate[charPolyMat[d]],##]&@@Table[{flatMat[d][[i]],0,n},{i,1,d^2}],3]]]; Table[a[2,n],{n,0,41}]
%o A366448 (PARI) a(n) = my(list=List()); for (i=0, n, for (j=0, n, for(k=0, n, for(m=0, n, my(p=charpoly([i,j;k,m])); listput(list, p))))); #Set(list); \\ _Michel Marcus_, Oct 11 2023
%o A366448 (Python)
%o A366448 def A366448(n): return len({(a+d,a*d-b*c) for a in range(n+1) for b in range(n+1) for c in range(b+1) for d in range(a+1)}) # _Chai Wah Wu_, Oct 12 2023
%Y A366448 Cf. A366551 (3 X 3 matrices), A367978 (4 X 4 matrices).
%Y A366448 Cf. A058331 (determinants), A005408 (traces).
%Y A366448 Cf. A272659, A365926.
%K A366448 nonn
%O A366448 0,2
%A A366448 _Robert P. P. McKone_, Oct 10 2023