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

A374067 a(n) is the permanent of the symmetric Toeplitz matrix of order n whose element (i,j) equals the |i-j|-th prime or 1 if i = j.

Original entry on oeis.org

1, 1, 5, 42, 753, 22969, 1226225, 98413280, 11551199289, 1828335971613, 379823112871605, 102232301626742202, 34359550765856135217, 14289766516805617273497, 7224166042347461997365713, 4334493536305030883929928032, 3046742350470292308074313518937, 2492781304663024301187012794633153
Offset: 0

Views

Author

Stefano Spezia, Jun 27 2024

Keywords

Comments

Conjecture: a(n) is the minimal permanent of an n X n symmetric Toeplitz matrix having 1 on the main diagonal and all the first n-1 primes off-diagonal. - Stefano Spezia, Jul 08 2024

Examples

			a(4) = 753:
  [1, 2, 3, 5]
  [2, 1, 2, 3]
  [3, 2, 1, 2]
  [5, 3, 2, 1]
		

Crossrefs

Cf. A071078 (determinant), A306457, A318173.

Programs

  • Mathematica
    a[n_]:=Permanent[Table[ If[i == j, 1, Prime[Abs[i - j]]], {i, 1, n}, {j, 1, n}]]; Join[{1},Array[a, 17]]
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, if (i==j, 1, prime(abs(i-j))))); \\ Michel Marcus, Jun 27 2024

A374068 a(n) is the permanent of the symmetric Toeplitz matrix of order n whose element (i,j) equals the |i-j|-th prime or 0 if i = j.

Original entry on oeis.org

1, 0, 4, 24, 529, 16100, 919037, 75568846, 9196890092, 1491628025318, 317579623173729, 86997150829931700, 29703399282858184713, 12512837775355494800500, 6397110844644502402189404, 3875565057688532269985283868, 2747710211567246171588232074225, 2265312860218073375019946448731300
Offset: 0

Views

Author

Stefano Spezia, Jun 27 2024

Keywords

Comments

Conjecture: a(n) is the minimal permanent of an n X n symmetric Toeplitz matrix having 0 on the main diagonal and all the first n-1 primes off-diagonal. - Stefano Spezia, Jul 06 2024

Examples

			a(4) = 529:
  [0, 2, 3, 5]
  [2, 0, 2, 3]
  [3, 2, 0, 2]
  [5, 3, 2, 0]
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Permanent[Table[If[i == j, 0, Prime[Abs[i - j]]], {i, 1, n}, {j, 1, n}]]; Join[{1},Array[a, 17]]
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, if (i==j, 0, prime(abs(i-j))))); \\ Michel Marcus, Jun 28 2024

A322908 The determinant of an n X n Toeplitz matrix M(n) whose first row consists of successive positive integer numbers 1, ..., n and whose first column consists of 1, n + 1, ..., 2*n - 1.

Original entry on oeis.org

1, -5, 38, -386, 4928, -75927, 1371808, -28452356, 666445568, -17402398505, 501297595904, -15792876550662, 540190822408192, -19937252888438459, 789770307546718208, -33422580292067020808, 1504926927960887066624, -71839548181524098808909, 3624029163661165580910592
Offset: 1

Views

Author

Stefano Spezia, Dec 30 2018

Keywords

Comments

The matrix M(n) differs from that of A318173 in using successive positive integers in place of successive prime numbers.
The trace of the matrix M(n) is A000027(n).
The sum of the first row of the matrix M(n) is A000217(n).
The sum of the first column of the matrix M(n) is A005448(n). [Corrected by Stefano Spezia, Dec 11 2019]
For n > 1, the sum of the superdiagonal of the matrix M(n) is A005843(n).

Examples

			For n = 1 the matrix M(1) is
   1
with determinant Det(M(1)) = 1.
For n = 2 the matrix M(2) is
   1, 2
   3, 1
with Det(M(2)) = -5.
For n = 3 the matrix M(3) is
   1, 2, 3
   4, 1, 2
   5, 4, 1
with Det(M(3)) = 38.
		

Crossrefs

Cf. A322909 (permanent of matrix M(n)).

Programs

  • Maple
    a:= proc(n) uses LinearAlgebra;
    Determinant(ToeplitzMatrix([seq(i, i=2*n-1..n+1, -1), seq(i, i=1..n)]))
    end proc:
    map(a, [$1..20]);
  • Mathematica
    b[n_]:=n; a[n_]:=Det[ToeplitzMatrix[Join[{b[1]}, Array[b, n-1, {n+1, 2*n-1}]], Array[b, n]]]; Array[a, 20]
  • PARI
    tm(n) = {my(m = matrix(n, n, i, j, if (i==1, j, if (j==1, n+i-1)))); for (i=2, n, for (j=2, n, m[i, j] = m[i-1, j-1]; ); ); m; }
    a(n) = matdet(tm(n)); \\ Michel Marcus, Nov 11 2020

Formula

a(n) ~ -(-1)^n * (3*exp(1) - exp(-1)) * n^n / 4. - Vaclav Kotesovec, Jan 05 2019

A350933 Maximal determinant of an n X n Toeplitz matrix using the first 2*n - 1 prime numbers.

Original entry on oeis.org

1, 2, 19, 1115, 86087, 9603283, 2307021183, 683793949387
Offset: 0

Views

Author

Stefano Spezia, Jan 25 2022

Keywords

Comments

For n X n Hankel matrices the same maximal determinants appear.

Examples

			a(2) = 19:
    5    2
    3    5
a(3) = 1115:
   11    2    5
    7   11    2
    3    7   11
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Max[Table[Abs[Det[HankelMatrix[Join[Drop[per = Part[Permutations[Prime[Range[2 n - 1]]], i], n], {Part[per, n]}], Join[{Part[per, n]}, Drop[per, - n]]]]], {i, (2 n - 1) !}]]; Join[{1}, Array[a, 5]] (* Stefano Spezia, Feb 06 2024 *)
  • PARI
    a(n) = my(v=[1..2*n-1], m=-oo, d); forperm(v, p, d = abs(matdet(matrix(n, n, i, j, prime(p[i+j-1])))); if (d>m, m = d)); m; \\ Michel Marcus, Feb 08 2024
  • Python
    from itertools import permutations
    from sympy import Matrix, prime
    def A350933(n): return max(Matrix([p[n-1-i:2*n-1-i] for i in range(n)]).det() for p in permutations(prime(i) for i in range(1,2*n))) # Chai Wah Wu, Jan 27 2022
    

Extensions

a(5) from Alois P. Heinz, Jan 25 2022
a(6)-a(7) from Lucas A. Brown, Aug 27 2022

A306457 The permanent of an n X n Toeplitz matrix M(n) whose first row consists of successive prime numbers prime(1), ..., prime(n) and whose first column consists of prime(1), prime(n + 1), ..., prime(2*n - 1).

Original entry on oeis.org

1, 2, 19, 546, 40851, 4747510, 986799301, 292666754602, 135134321711681, 80312872924339660, 55242523096584443271, 52058868505260739019880, 55579419798019716586180451, 72402676504369062268839297084, 120521257466525185305708420453019, 234000358527930078723939842673115488
Offset: 0

Views

Author

Stefano Spezia, Feb 17 2019

Keywords

Comments

The trace of the matrix M(n) is A005843(n).
The sum of the first row of the matrix M(n) is A007504(n).
The determinant of the matrix M(n) is A318173(n).
For n > 1, the subdiagonal sum of the matrix M(n) is A306192(n).

Examples

			For n = 1 the matrix M(1) is
    2
with permanent a(1) = 2.
For n = 2 the matrix M(2) is
    2, 3
    5, 2
with permanent a(2) = 19.
For n = 3 the matrix M(3) is
    2, 3, 5
    7, 2, 3
   11, 7, 2
with permanent a(3) = 546.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) uses LinearAlgebra; `if`(n=0, 1, Permanent(ToeplitzMatrix([seq(ithprime(i), i=2*n-1..n+1, -1), seq(ithprime(i), i=1..n)]))) end proc: map(f, [$0..15]);
  • Mathematica
    p[i_]:=Prime[i];a[n_]:=If[n==0,1,Permanent[ToeplitzMatrix[Join[{p[1]},Array[p,n-1,{n+1,2*n-1}]],Array[p,n]]]];Array[a,15,0]
  • PARI
    tm(n) = {my(m = matrix(n, n, i, j, if (i==1, prime(j), if (j==1, prime(n+i-1))))); for (i=2, n, for (j=2, n, m[i,j] = m[i-1, j-1];);); m;}
    a(n) = matpermanent(tm(n)); \\ Michel Marcus, Mar 16 2019

Extensions

a(0) = 1 prepended by Stefano Spezia, Dec 06 2019

A323254 The determinant of an n X n Toeplitz matrix M(n) whose first row consists of successive positive integer numbers 2*n - 1, n - 1, ..., 1 and whose first column consists of 2*n - 1, 2*n - 2, ..., n.

Original entry on oeis.org

1, 7, 58, 614, 8032, 125757, 2298208, 48075148, 1133554432, 29756555315, 860884417024, 27218972906226, 933850899349504, 34556209025624041, 1371957513591119872, 58174957356247084568, 2624017129323317493760, 125454378698728779884895, 6337442836338834419089408
Offset: 1

Views

Author

Stefano Spezia, Jan 09 2019

Keywords

Comments

The trace of the matrix M(n) is A000384(n). [Corrected by Stefano Spezia, Dec 08 2019]
The sum of the first row of the matrix M(n) is A034856(n).
The sum of the first column of the matrix M(n) is A000326(n).
For n > 1, the sum of the superdiagonal of the matrix M(n) is A000290(n-1).
For n > 1, the sum of the subdiagonal of the matrix M(n) is A001105(n-1).

Examples

			For n = 1 the matrix M(1) is
   1
with determinant Det(M(1)) = 1.
For n = 2 the matrix M(2) is
   3, 1
   2, 3
with Det(M(2)) = 7.
For n = 3 the matrix M(3) is
   5, 2, 1
   4, 5, 2
   3, 4, 5
with Det(M(3)) = 58.
		

Crossrefs

Cf. A323255 (permanent of matrix M(n)).

Programs

  • Mathematica
    b[i_]:=i; a[n_]:=Det[ToeplitzMatrix[Join[{b[2*n-1]}, Array[b, n-1, {2*n-2,n}]], Join[{b[2*n-1]},Array[b, n-1, {n-1,1}]]]]; Array[a,20]
  • PARI
    tm(n) = {my(m = matrix(n, n, i, j, if (j==1, 2*n-i, n-j+1))); for (i=2, n, for (j=2, n, m[i, j] = m[i-1, j-1]; ); ); m;}
    a(n) = matdet(tm(n)); \\ Stefano Spezia, Dec 11 2019

Formula

a(n) ~ (5*exp(1) + exp(-1)) * n^n / 4. - Vaclav Kotesovec, Jan 10 2019

A350939 Minimal permanent of an n X n Toeplitz matrix using the first 2*n - 1 prime numbers.

Original entry on oeis.org

1, 2, 19, 496, 29609, 3009106, 498206489
Offset: 0

Views

Author

Stefano Spezia, Jan 26 2022

Keywords

Comments

For n X n Hankel matrices the same minimal permanents appear.

Examples

			a(2) = 19:
    2    3
    5    2
a(3) = 496:
    2    3    7
    5    2    3
   11    5    2
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Min[Table[Permanent[HankelMatrix[Join[Drop[per = Part[Permutations[Prime[Range[2 n - 1]]], i], n], {Part[per, n]}], Join[{Part[per, n]}, Drop[per, - n]]]], {i, (2 n - 1) !}]]; Join[{1}, Array[a, 5]] (* Stefano Spezia, Feb 06 2024 *)
  • PARI
    a(n) = my(v=[1..2*n-1], m=+oo, d); forperm(v, p, d = matpermanent(matrix(n, n, i, j, prime(p[i+j-1]))); if (dMichel Marcus, Feb 08 2024
  • Python
    from itertools import permutations
    from sympy import Matrix, prime
    def A350939(n): return 1 if n == 0 else min(Matrix([p[n-1-i:2*n-1-i] for i in range(n)]).per() for p in permutations(prime(i) for i in range(1,2*n))) # Chai Wah Wu, Jan 27 2022
    

Extensions

a(5) from Alois P. Heinz, Jan 26 2022
a(6) from Lucas A. Brown, Sep 05 2022

A350940 Maximal permanent of an n X n Toeplitz matrix using the first 2*n - 1 prime numbers.

Original entry on oeis.org

1, 2, 31, 2364, 346018, 82285908, 39135296624
Offset: 0

Views

Author

Stefano Spezia, Jan 26 2022

Keywords

Comments

For n X n Hankel matrices the same maximal permanents appear.

Examples

			a(2) = 31:
    5    2
    3    5
a(3) = 2364:
   11    5    3
    7   11    5
    2    7   11
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Max[Table[Permanent[HankelMatrix[Join[Drop[per = Part[Permutations[Prime[Range[2 n - 1]]], i], n], {Part[per, n]}], Join[{Part[per, n]}, Drop[per, - n]]]], {i, (2 n - 1) !}]]; Join[{1}, Array[a, 5]] (* Stefano Spezia, Feb 06 2024 *)
  • PARI
    a(n) = my(v=[1..2*n-1], m=-oo, d); forperm(v, p, d = matpermanent(matrix(n, n, i, j, prime(p[i+j-1]))); if (d>m, m = d)); m; \\ Michel Marcus, Feb 08 2024
  • Python
    from itertools import permutations
    from sympy import Matrix, prime
    def A350940(n): return 1 if n == 0 else max(Matrix([p[n-1-i:2*n-1-i] for i in range(n)]).per() for p in permutations(prime(i) for i in range(1,2*n))) # Chai Wah Wu, Jan 27 2022
    

Extensions

a(5) from Alois P. Heinz, Jan 26 2022
a(6) from Lucas A. Brown, Sep 05 2022

A350932 Minimal determinant of an n X n Toeplitz matrix using the first 2*n - 1 prime numbers, with a(0) = 1.

Original entry on oeis.org

1, 2, -11, -286, -57935, -5696488, -1764195984, -521528189252
Offset: 0

Views

Author

Stefano Spezia, Jan 25 2022

Keywords

Examples

			a(2) = -11:
    2    3
    5    2
a(3) = -286:
    5    7    2
   11    5    7
    3   11    5
		

Crossrefs

Cf. A318173, A350930, A350933 (maximal).

Programs

  • Maple
    f:= proc(n) local i;
      min(map(t -> LinearAlgebra:-Determinant(LinearAlgebra:-ToeplitzMatrix(t)), combinat:-permute([seq(ithprime(i),i=1..2*n-1)]))) end proc:
    f(0):= 1:
    map(f, [$0..5]); # Robert Israel, Apr 01 2024
  • Python
    from itertools import permutations
    from sympy import Matrix, prime
    def A350932(n): return min(Matrix([p[n-1-i:2*n-1-i] for i in range(n)]).det() for p in permutations(prime(i) for i in range(1,2*n))) # Chai Wah Wu, Jan 27 2022

Extensions

a(5) from Alois P. Heinz, Jan 25 2022
a(6)-a(7) from Lucas A. Brown, Aug 27 2022

A306192 a(n) = (n - 1)*prime(n + 1).

Original entry on oeis.org

0, 5, 14, 33, 52, 85, 114, 161, 232, 279, 370, 451, 516, 611, 742, 885, 976, 1139, 1278, 1387, 1580, 1743, 1958, 2231, 2424, 2575, 2782, 2943, 3164, 3683, 3930, 4247, 4448, 4917, 5134, 5495, 5868, 6179, 6574, 6981, 7240, 7831, 8106, 8471, 8756, 9495, 10258
Offset: 1

Views

Author

Stefano Spezia, Jan 28 2019

Keywords

Comments

For n > 1, a(n) is the subdiagonal sum of the matrix M(n) whose determinant is A318173(n).

Crossrefs

Programs

  • Magma
    [(n-1)*NthPrime(n+1): n in [1..100]];
    
  • Maple
    a := n -> (n-1)*ithprime(n+1): seq(a(n), n = 1 .. 100);
  • Mathematica
    a[n_]:=(n-1)*Prime[n+1]; Array[a,100]
  • PARI
    a(n) = (n-1)*prime(n+1);
    
  • Python
    from sympy import prime
    [(n-1)*prime(n+1) for n in range(1,100)]

Formula

a(n) = A033286(n + 1) - 2*A000040(n + 1).
a(n) = (n - 1)/(n + 1)*A033286(n + 1).
Showing 1-10 of 13 results. Next