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-8 of 8 results.

A348891 Minimal absolute value of determinant of a nonsingular n X n symmetric Toeplitz matrix using the first n prime numbers.

Original entry on oeis.org

1, 2, 5, 12, 11, 22, 84, 1368, 73, 589, 15057, 2520, 28209
Offset: 0

Views

Author

N. J. A. Sloane and Stefano Spezia, Jan 28 2022

Keywords

Examples

			a(3) = 12:
    2    3    5
    3    2    3
    5    3    2
a(4) = 11:
    2    5    3    7
    5    2    5    3
    3    5    2    5
    7    3    5    2
a(5) = 22:
    2    3    5    7   11
    3    2    3    5    7
    5    3    2    3    5
    7    5    3    2    3
   11    7    5    3    2
		

Crossrefs

Programs

  • Python
    from itertools import permutations
    from sympy import Matrix, prime
    def A348891(n): return min(d for d in (abs(Matrix([p[i:0:-1]+p[0:n-i] for i in range(n)]).det()) for p in permutations(prime(i) for i in range(1,n+1))) if d > 0) # Chai Wah Wu, Jan 28 2022

Extensions

a(9) from Alois P. Heinz, Jan 28 2022
a(10)-a(12) from Lucas A. Brown, Aug 31 2022

A350956 Maximal determinant of an n X n symmetric Toeplitz matrix using the first n prime numbers.

Original entry on oeis.org

1, 2, 5, 64, 1107, 160160, 5713367, 889747443, 62837596341, 11671262491586, 3090090680653053, 635672008069583520, 278356729040728193703
Offset: 0

Views

Author

Stefano Spezia, Jan 27 2022

Keywords

Examples

			a(3) = 64:
   [5    2    3]
   [2    5    2]
   [3    2    5]
a(4) = 1107:
   [3    2    7    5]
   [2    3    2    7]
   [7    2    3    2]
   [5    7    2    3]
a(5) = 160160:
   [ 5   11    2    3    7]
   [11    5   11    2    3]
   [ 2   11    5   11    2]
   [ 3    2   11    5   11]
   [ 7    3    2   11    5]
		

Crossrefs

Cf. A350933, A350955 (minimal).

Programs

  • Python
    from itertools import permutations
    from sympy import Matrix, prime
    def A350956(n): return max(Matrix([p[i:0:-1]+p[0:n-i] for i in range(n)]).det() for p in permutations(prime(i) for i in range(1,n+1))) # Chai Wah Wu, Jan 27 2022

Extensions

a(9) from Alois P. Heinz, Jan 27 2022
a(10)-a(12) from Lucas A. Brown, Aug 29 2022

A351021 Minimal permanent of an n X n symmetric Toeplitz matrix using the first n prime numbers.

Original entry on oeis.org

1, 2, 13, 166, 4009, 169469, 10949857, 1078348288, 138679521597, 24402542896843, 5348124003487173
Offset: 0

Views

Author

Stefano Spezia, Jan 29 2022

Keywords

Examples

			a(3) = 166:
    3    2    5
    2    3    2
    5    2    3
a(4) = 4009:
    3    2    5    7
    2    3    2    5
    5    2    3    2
    7    5    2    3
a(5) = 169469:
    5    2    3    7   11
    2    5    2    3    7
    3    2    5    2    3
    7    3    2    5    2
   11    7    3    2    5
		

Crossrefs

Cf. A348891, A350939, A350955, A351022 (maximal).

Programs

  • Python
    from itertools import permutations
    from sympy import Matrix, prime
    def A351021(n): return 1 if n == 0 else min(Matrix([p[i:0:-1]+p[0:n-i] for i in range(n)]).per() for p in permutations(prime(i) for i in range(1,n+1))) # Chai Wah Wu, Jan 31 2022

Extensions

a(9) and a(10) from Lucas A. Brown, Sep 04 2022

A369832 a(n) is the number of distinct values of the determinant of an n X n symmetric Toeplitz matrix using the first n prime numbers.

Original entry on oeis.org

1, 1, 2, 6, 24, 116, 717, 5033, 40301, 362845
Offset: 0

Views

Author

Stefano Spezia, Feb 03 2024

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := CountDistinct[Table[Det[ToeplitzMatrix[Part[Permutations[Prime[Range[n]]], i]]], {i, n !}]]; Join[{1}, Array[a,9]]
  • Python
    from itertools import permutations
    from sympy import primerange, prime, Matrix
    def A369832(n): return len({Matrix([p[i:0:-1]+p[:n-i] for i in range(n)]).det() for p in permutations(primerange(prime(n)+1))}) if n else 1 # Chai Wah Wu, Feb 11 2024

Formula

a(n) <= A000142(n).

A356490 a(n) is the determinant of a symmetric Toeplitz matrix M(n) whose first row consists of prime(1), prime(2), ..., prime(n).

Original entry on oeis.org

1, 2, -5, 12, -19, -22, 1143, -4284, 14265, -46726, -84405, 1306096, 32312445, 522174906, 4105967871, 5135940112, -642055973735, -2832632334858, 14310549077571, 380891148658140, 4888186898996125, -49513565563840210, 383405170118692791, -2517836083641473036, -3043377347606882055
Offset: 0

Views

Author

Stefano Spezia, Aug 09 2022

Keywords

Comments

Conjecture: abs(a(n)) is prime only for n = 1, 2, and 4.

Examples

			For n = 1 the matrix M(1) is
    2
with determinant a(1) = 2.
For n = 2 the matrix M(2) is
    2, 3
    3, 2
with determinant a(2) = -5.
For n = 3 the matrix M(3) is
    2, 3, 5
    3, 2, 3
    5, 3, 2
with determinant a(3) = 12.
		

Crossrefs

Cf. A005843 (trace of M(n)), A309131 (k-superdiagonal sum of M(n)), A356483 (hafnian of M(2*n)), A356491 (permanent of M(n)).

Programs

  • Maple
    A356490 := proc(n)
        local T,c ;
        if n =0 then
            return 1 ;
        end if;
        T := LinearAlgebra[ToeplitzMatrix]([seq(ithprime(c),c=1..n)],n,symmetric) ;
        LinearAlgebra[Determinant](T) ;
    end proc:
    seq(A356490(n),n=0..15) ; # R. J. Mathar, Jan 31 2023
  • Mathematica
    k[i_]:=Prime[i]; M[ n_]:=ToeplitzMatrix[Array[k, n]]; a[n_]:=Det[M[n]]; Join[{1},Table[a[n],{n,24}]]
  • PARI
    a(n) = matdet(apply(prime, matrix(n,n,i,j,abs(i-j)+1))); \\ Michel Marcus, Aug 12 2022
    
  • Python
    from sympy import Matrix, prime
    def A356490(n): return Matrix(n,n,[prime(abs(i-j)+1) for i in range(n) for j in range(n)]).det() # Chai Wah Wu, Aug 12 2022

Formula

A350955(n) <= a(n) <= A350956(n).

A356492 a(n) is the determinant of a symmetric Toeplitz matrix M(n) whose first row consists of prime(n), prime(n-1), ..., prime(1).

Original entry on oeis.org

1, 2, 5, 51, 264, 19532, -11904, 1261296, -2052864, 70621632, 24618221568, 3996020736, 743171562496, 24567175118848, -1257930752000, 864893030400, 12289833785344000, 1099483729459478528, 100515455071223808, 757166323365314560, 6294658173770137600, 7801939905505132544
Offset: 0

Views

Author

Stefano Spezia, Aug 09 2022

Keywords

Comments

Conjecture: a(n) is prime only for n = 1 and 2.
Conjecture is true because a(n) is even for n >= 4. This is because all but two rows of the matrix consist of odd numbers. - Robert Israel, Oct 13 2023

Examples

			For n = 1 the matrix M(1) is
    2
with determinant a(1) = 2.
For n = 2 the matrix M(2) is
    3, 2
    2, 3
with determinant a(2) = 5.
For n = 3 the matrix M(3) is
    5, 3, 2
    3, 5, 3
    2, 3, 5
with determinant a(3) = 51.
		

Crossrefs

Cf. A033286 (trace of the matrix M(n)), A356484 (hafnian of the matrix M(2*n)), A356493 (permanent of the matrix M(n)).

Programs

  • Maple
    f:=proc(n) uses LinearAlgebra; local i;
     Determinant(ToeplitzMatrix([seq(ithprime(i),i=n..1,-1)],symmetric));
    end proc:
    q(0):= 1:
    map(q, [$0..25]); # Robert Israel, Oct 13 2023
  • Mathematica
    k[i_]:=Prime[i]; M[ n_]:=ToeplitzMatrix[Reverse[Array[k, n]]]; a[n_]:=Det[M[n]]; Join[{1},Table[a[n],{n,21}]]
  • PARI
    a(n) = matdet(apply(prime, matrix(n,n,i,j,n-abs(i-j)))); \\ Michel Marcus, Aug 12 2022

Formula

A350955(n) <= a(n) <= A350956(n).

A364233 Triangle read by rows: T(n, k) is the number of n X n symmetric Toeplitz matrices of rank k using all the first n prime numbers integers.

Original entry on oeis.org

1, 0, 2, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, 0, 120, 0, 0, 0, 0, 2, 718, 0, 0, 0, 0, 0, 4, 5036, 0, 0, 0, 0, 0, 1, 3, 40316, 0, 0, 0, 0, 0, 0, 0, 18, 362862, 0, 0, 0, 0, 0, 0, 0, 0, 14, 3628786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 39916701, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 78, 479001517
Offset: 1

Views

Author

Stefano Spezia, Jul 14 2023

Keywords

Examples

			The triangle begins:
  1;
  0, 2;
  0, 0, 6;
  0, 0, 0, 24;
  0, 0, 0,  0, 120;
  0, 0, 0,  0,   2, 718;
  0, 0, 0,  0,   0,   4, 5036;
  ...
		

Crossrefs

Cf. A000142 (row sums), A348891 (minimal nonzero absolute value determinant), A350955 (minimal determinant), A350956 (maximal determinant), A351021 (minimal permanent), A351022 (maximal permanent), A364234 (right diagonal).

Programs

  • Mathematica
    T[n_,k_]:= Count[Table[MatrixRank[ToeplitzMatrix[Part[Permutations[Prime[Range[n]]], i]]],{i,n!}],k]; Table[T[n,k],{n,8},{k,n}]//Flatten
  • PARI
    MkMat(v)={matrix(#v, #v, i, j, v[1+abs(i-j)])}
    row(n)={my(f=vector(n)); forperm(vector(n,i,prime(i)), v, f[matrank(MkMat(v))]++); f} \\ Andrew Howroyd, Dec 31 2023

Extensions

Terms a(46) and beyond from Andrew Howroyd, Dec 31 2023

A364234 a(n) is the number of n X n nonsingular symmetric Toeplitz matrices using all the first n prime numbers.

Original entry on oeis.org

1, 2, 6, 24, 120, 718, 5036, 40316, 362862, 3628786, 39916701, 479001517
Offset: 1

Views

Author

Stefano Spezia, Jul 14 2023

Keywords

Crossrefs

Right diagonal of A364233.
Cf. A348891 (minimal nonzero absolute value determinant), A350955 (minimal determinant), A350956 (maximal determinant), A351021 (minimal permanent), A351022 (maximal permanent).

Programs

  • Mathematica
    a[n_]:=Count[Table[MatrixRank[ToeplitzMatrix[Part[Permutations[Prime[Range[n]]], i]]], {i, n!}], n]; Array[a, 8]

Extensions

a(10)-a(12) from Andrew Howroyd, Dec 31 2023
Showing 1-8 of 8 results.