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 13 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

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

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

Original entry on oeis.org

1, 2, 6, 28, 203, 3150, 131641
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

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

Extensions

a(5) and 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

A271570 Number of distinct eigenvalues of n X n matrices with elements {-1, 0, +1}.

Original entry on oeis.org

3, 21, 375, 24823
Offset: 1

Views

Author

Steven E. Thornton, Jul 13 2016

Keywords

References

  • Steven E. Thornton & Robert M. Corless, The Bohemian Eigenvalue Project, Poster Presented at The International Symposium on Symbolic and Algebraic Computation (ISSAC 2016). Wilfrid Laurier University, July 19-22, 2016.

Crossrefs

Number of characteristic polynomials: A272658.
Cf. A060722.

Programs

  • Mathematica
    (* Program not suitable to compute more than 3 terms *)
    a[n_] := Module[{r, iter}, iter = Table[{r[k], {-1, 0, 1}}, {k, 1, n^2}]; Eigenvalues /@ (Table[Table[(r[# + j]& /@ Range[n]), {j, 0, n^2 - n, n}], Sequence @@ iter // Evaluate] // Flatten[#, n^2 - 1]&) // Flatten // Union // Length];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 3}] (* Jean-François Alcover, Jun 17 2018 *)

Formula

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

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

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

Original entry on oeis.org

3, 19, 220, 8924
Offset: 1

Views

Author

Steven E. Thornton, Jul 13 2016

Keywords

References

  • Steven E. Thornton & Robert M. Corless, The Bohemian Eigenvalue Project, Poster Presented at The International Symposium on Symbolic and Algebraic Computation (ISSAC 2016). Wilfrid Laurier University, July 19-22, 2016.

Crossrefs

Number of characteristic polynomials A272658.

A271588 Number of matrices with multiple eigenvalues from the set of n X n matrices with elements {-1, 0, +1}.

Original entry on oeis.org

0, 19, 4629, 7171257, 89765448427
Offset: 1

Views

Author

Steven E. Thornton, Jul 13 2016

Keywords

References

  • Steven E. Thornton and Robert M. Corless, The Bohemian Eigenvalue Project, Poster Presented at The International Symposium on Symbolic and Algebraic Computation (ISSAC 2016). Wilfrid Laurier University, July 19-22, 2016.

Crossrefs

Number of characteristic polynomials A272658.
Cf. A060722.

Programs

  • Mathematica
    a[n_Integer?NonNegative] := a[n] = Module[{m, ei}, ei[matrix_] := Length[Select[Tally[Eigenvalues[matrix]], Last[#] > 1 &]] > 0; m = Tuples[Tuples[{-1, 0, 1}, n], n]; Count[m, mat_ /; ei[mat]]]; Table[a[i], {i, 1, 3}] (* Robert P. P. McKone, Sep 16 2023 *)

Formula

a(n) <= A060722(n) where A060722(n) = 3^(n^2); see Corless and Thornton poster link. Robert P. P. McKone, Sep 16 2023

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
Showing 1-10 of 13 results. Next