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.

Showing 1-10 of 12 results. Next

A272659 Number of distinct characteristic polynomials of n X n matrices with elements {0, 1, 2}.

Original entry on oeis.org

1, 3, 22, 513, 58335, 40422490
Offset: 0

Views

Author

N. J. A. Sloane, May 15 2016

Keywords

Crossrefs

Six classes of matrices mentioned in Rob Corless's talk: A272658, A272659, A272660, A272661, A272662, A272663.

Programs

  • Python
    from itertools import product
    from sympy import Matrix
    def A272659(n): return len({tuple(Matrix(n,n,p).charpoly().as_list()) for p in product(range(3),repeat=n**2)}) if n else 1 # Chai Wah Wu, Sep 30 2023

Extensions

a(4) from Chai Wah Wu, Dec 03 2018
a(5) from Steven E. Thornton, Mar 09 2019
a(0)=1 prepended by Alois P. Heinz, Sep 28 2023

A272658 Number of distinct characteristic polynomials of n X n matrices with elements {-1, 0, +1}.

Original entry on oeis.org

1, 3, 16, 209, 8739, 1839102
Offset: 0

Views

Author

N. J. A. Sloane, May 15 2016

Keywords

References

  • Robert M. Corless, Bohemian Eigenvalues, Talk Presented at Computational Discovery in Mathematics (ACMES 2), University of Western Ontario, May 12 2016. (Talk based on joint work with Steven E. Thornton, Sonia Gupta, Jonathan Brino-Tarasoff, Venkat Balasubramanian.)

Crossrefs

Six classes of matrices mentioned in Rob Corless's talk: this sequence, A272659, A272660, A272661, A272662, A272663.
Other properties of this class of matrices: A271570, A271587, A271588. - Steven E. Thornton, Jul 13 2016

Programs

  • Mathematica
    a[n_] := a[n] = Module[{m, cPolys}, m = Tuples[Tuples[{-1, 0, 1}, n], n]; cPolys = CharacteristicPolynomial[#, x] & /@ m; Length[DeleteDuplicates[cPolys]]]; Table[a[i], {i, 1, 3}] (* Robert P. P. McKone, Sep 16 2023 *)
  • Python
    from itertools import product
    from sympy import Matrix
    def A272658(n): return len({tuple(Matrix(n,n,p).charpoly().as_list()) for p in product((-1,0,1),repeat=n**2)}) if n else 1 # Chai Wah Wu, Sep 30 2023

Formula

a(n) <= 3^(n^2). - Robert P. P. McKone, Sep 16 2023

Extensions

a(4) found by Daniel Lichtblau, May 13 2016
a(5) found by Daniel Lichtblau and Steven E. Thornton, May 19 2016
a(0)=1 prepended by Alois P. Heinz, Sep 28 2023

A272661 Number of distinct characteristic polynomials of n X n matrices with elements {0, 1}.

Original entry on oeis.org

1, 2, 6, 32, 333, 8927, 758878
Offset: 0

Views

Author

N. J. A. Sloane, May 15 2016

Keywords

References

  • Robert M. Corless, Bohemian Eigenvalues, Talk Presented at Computational Discovery in Mathematics (ACMES 2), University of Western Ontario, May 12 2016. (Talk based on joint work with Steven E. Thornton, Sonia Gupta, Jonathan Brino-Tarasoff, Venkat Balasubramanian.)

Crossrefs

Six classes of matrices mentioned in Rob Corless's talk: A272658, A272659, A272660, A272661, A272662, A272663.

Programs

  • MATLAB
    function count = A272661(N)
      C = zeros(0,N);
      count = 0;
      V = zeros(1,N);
      L = -floor(N/2) + [0:N-1];
      for x = 0:2^(N^2)-1;
        r = dec2bin(x+2^(N^2))-'0';
        A = reshape(r(2:end),N,N);
        rowcounts = sum(A,2);
        colcounts = sum(A,1);
        if ~issorted(rowcounts)|| rowcounts(N) < max(colcounts)
          continue
        end
        for i = 1:N
            V(i) = round(det(A - L(i)*eye(N)));
        end
        if ~ismember(V, C, 'rows')
          count = count+1;
          C(count,:) = V;
        end
      end
    end  % Robert Israel, Aug 18 2016
    
  • Python
    from itertools import product
    from sympy import Matrix
    def A272661(n): return len({tuple(Matrix(n,n,p).charpoly().as_list()) for p in product((0,1),repeat=n**2)}) if n else 1 # Chai Wah Wu, Sep 30 2023

Extensions

a(5) from Robert Israel, Aug 18 2016
a(6) from Steven E. Thornton, Mar 09 2019
a(0)=1 prepended by Alois P. Heinz, Sep 28 2023

A272660 Number of distinct characteristic polynomials of n X n matrices with elements {t, 1, 2} where t is an indeterminate.

Original entry on oeis.org

1, 3, 36, 1782, 760678
Offset: 0

Views

Author

N. J. A. Sloane, May 15 2016

Keywords

Examples

			From _Robin Visser_, May 01 2025: (Start)
For n = 1, the a(1) = 3 possible characteristic polynomials are x - 2, x - 1, and x - t.
For n = 2, the a(2) = 36 possible characteristic polynomials are x^2 - 2x - 1, x^2 - 2x, x^2 + (-t-2)x, x^2 + (-t-2)x - t^2+2t, x^2 + (-t-1)x, x^2 + (-t-1)x - t^2+t, x^2 - 4x, x^2 - 4x + 2, x^2 - 4x + 3, x^2 - 3x - 2, x^2 - 3x, x^2 - 3x + 1, x^2 - 2tx + t^2-4, x^2 - 2tx + t^2-2, x^2 - 2tx + t^2-1, x^2 + (-t-2)x + t, x^2 - 4x - t+4, x^2 - 4x - t^2+4, x^2 - 2x - 3, x^2 - 2tx, x^2 - 2tx + t^2-t, x^2 - 2tx + t^2-2t, x^2 - 4x - 2t+4, x^2 - 3x - t^2+2, x^2 - 3x - t+2, x^2 - 3x - 2t+2, x^2 - 2x - t^2+1, x^2 - 2x - t+1, x^2 - 2x - 2t+1, x^2 + (-t-2)x + 2t-4, x^2 + (-t-2)x + 2t-2, x^2 + (-t-2)x + 2t-1, x^2 + (-t-1)x + t-4, x^2 + (-t-1)x + t-2, x^2 + (-t-1)x + t-1, and x^2 + (-t-1)x - t. (End)
		

References

  • Robert M. Corless, Bohemian Eigenvalues, Talk Presented at Computational Discovery in Mathematics (ACMES 2), University of Western Ontario, May 12 2016. (Talk based on joint work with Steven E. Thornton, Sonia Gupta, Jonathan Brino-Tarasoff, Venkat Balasubramanian.)

Crossrefs

Six classes of matrices mentioned in Rob Corless's talk: A272658, A272659, A272660, A272661, A272662, A272663.

Programs

  • Sage
    import itertools
    def a(n):
        ans, t = set(), SR('t')
        W = itertools.product([t, 1, 2], repeat=n*n)
        for w in W: ans.add(Matrix(SR, n, n, w).charpoly())
        return len(ans)  # Robin Visser, May 01 2025

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 28 2023
a(4) from Robin Visser, May 01 2025

A272663 Number of distinct characteristic polynomials of n X n matrices with elements {t, 1}, where t is an indeterminate.

Original entry on oeis.org

1, 2, 9, 68, 1161, 65348
Offset: 0

Views

Author

N. J. A. Sloane, May 15 2016

Keywords

Examples

			From _Robin Visser_, May 01 2025: (Start)
For n = 1, the a(1) = 2 possible characteristic polynomials are x - 1 and x - t.
For n = 2, the a(2) = 9 possible characteristic polynomials are x^2 - 2*x, x^2 - 2*t*x, x^2 - 2*t*x + t^2 - t, x^2 + (-t - 1)*x, x^2 + (-t - 1)*x - t^2 + t, x^2 - 2*x - t^2 + 1, x^2 - 2*t*x + t^2 - 1, x^2 - 2*x - t + 1, and x^2 + (-t - 1)*x + t - 1. (End)
		

Crossrefs

Six classes of matrices mentioned in Rob Corless's talk: A272658, A272659, A272660, A272661, A272662, A272663.

Programs

  • Sage
    import itertools
    def a(n):
        ans, t = set(), SR('t')
        W = itertools.product([t, 1], repeat=n*n)
        for w in W: ans.add(Matrix(SR, n, n, w).charpoly())
        return len(ans)  # Robin Visser, May 01 2025

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 28 2023
a(5) from Robin Visser, May 04 2025

A306782 Number of distinct minimal polynomials of n X n matrices with elements {-1, 1}.

Original entry on oeis.org

2, 6, 30, 223, 3408
Offset: 1

Views

Author

Steven E. Thornton, Mar 09 2019

Keywords

Crossrefs

Number of characteristic polynomials is in A272662.

A306791 Number of distinct eigenvalues of n X n matrices with elements {-1, 1}.

Original entry on oeis.org

2, 9, 35, 335, 7709, 510743
Offset: 1

Views

Author

Steven E. Thornton, Mar 10 2019

Keywords

Crossrefs

Number of characteristic polynomials is in A272662.
Number of minimal polynomials is in A306782.

A365926 Number of distinct characteristic polynomials for n X n matrices with entries in {0, 1, ..., n-1}.

Original entry on oeis.org

1, 1, 6, 513, 2875405
Offset: 0

Views

Author

Robert P. P. McKone, Sep 23 2023

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{polynomials = {}, polynomial}, Monitor[Do[polynomial = CharacteristicPolynomial[ArrayReshape[IntegerDigits[i, n, n^2], {n, n}], x]; If[Not[MemberQ[polynomials, polynomial]], AppendTo[polynomials, polynomial]];, {i, 0, n^(n^2) - 1}], {n, {i, n^(n^2) - 1}, ProgressIndicator[i, {0, n^(n^2) - 1}]}]; Length[polynomials]]; Table[a[n], {n, 1, 3}]
  • Python
    from itertools import product
    from sympy import Matrix
    def A365926(n): return len({tuple(Matrix(n,n,p).charpoly().as_list()) for p in product(range(n),repeat=n**2)}) if n else 1 # Chai Wah Wu, Sep 30 2023

Extensions

a(4) from Robin Visser, May 04 2025

A366158 Number of distinct determinants of 3 X 3 matrices with entries from {0, 1, ..., n}.

Original entry on oeis.org

1, 5, 25, 77, 179, 355, 609, 995, 1497, 2167, 2999, 4069, 5289, 6841, 8595, 10661, 13023, 15777, 18795, 22305, 26085, 30397, 35107, 40381, 45929, 52247, 58929, 66287, 74139, 82767, 91643, 101701, 112013, 123235
Offset: 0

Views

Author

Robert P. P. McKone, Oct 02 2023

Keywords

Comments

These determinants a(n) equivalently represent the leading coefficient (coefficient of term with degree 0) of the characteristic polynomials for such matrices, thereby providing a direct measure and lower bound of the uniqueness of these polynomials within this matrix class.
The maximal determinant counted by a(n) is A033431(n) = 2*n^3.

Crossrefs

Cf. A058331 (distinct determinants for 2 X 2 matrices).
Cf. A365926.
Cf. A033431 (maximal determinant).
Cf. A097400 (distinct consecutive entries in 3 X 3 matrix).

Programs

  • Mathematica
    mat[n_Integer?Positive] := mat[n] = Array[m, {n, n}]; flatMat[n_Integer?Positive] := flatMat[n] = Flatten[mat[n]]; detMat[n_Integer?Positive] := detMat[n] = Det[mat[n]] // FullSimplify; a[d_Integer?Positive, 0] = 1; a[d_Integer?Positive, n_Integer?Positive] := a[d, n] = Length[DeleteDuplicates[Flatten[ParallelTable[Evaluate[detMat[d]], ##] & @@ Table[{flatMat[d][[i]], 0, n}, {i, 1, d^2}]]]]; Table[a[3, n], {n, 0, 9}]
  • Python
    from itertools import product
    def A366158(n): return len({a[0]*(a[4]*a[8] - a[5]*a[7]) - a[1]*(a[3]*a[8] - a[5]*a[6]) + a[2]*(a[3]*a[7] - a[4]*a[6]) for a in product(range(n+1),repeat=9)}) # Chai Wah Wu, Oct 06 2023

Extensions

a(19)-a(26) from Robin Visser, May 08 2025
a(27)-a(33) from Robin Visser, Aug 26 2025

A306794 Number of distinct real eigenvalues of n X n matrices with elements {-1, 1}.

Original entry on oeis.org

2, 5, 15, 119, 2297, 145213
Offset: 1

Views

Author

Steven E. Thornton, Mar 10 2019

Keywords

Crossrefs

Number of distinct eigenvalues is in A306791.
Number of characteristic polynomials is in A272662.
Number of minimal polynomials is in A306782.
Showing 1-10 of 12 results. Next