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.

A351020 Maximal permanent of an n X n symmetric Toeplitz matrix using the integers 1 to n.

Original entry on oeis.org

1, 1, 5, 64, 1650, 66731, 3968777, 323676148, 34890266414, 4780256317586, 814873637329516, 168491370685328792
Offset: 0

Views

Author

Stefano Spezia, Jan 29 2022

Keywords

Examples

			a(3) = 64:
     2    3    1
     3    2    3
     1    3    2
a(4) = 1650:
     3    4    2    1
     4    3    4    2
     2    4    3    4
     1    2    4    3
a(5) = 66731:
     3    5    4    2    1
     5    3    5    4    2
     4    5    3    5    4
     2    4    5    3    5
     1    2    4    5    3
		

Crossrefs

Cf. A204235, A307783, A350938, A351019 (minimal).

Programs

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

Extensions

a(9) from Alois P. Heinz, Jan 31 2022
a(10)-a(11) from Lucas A. Brown, Sep 06 2022

A351019 Minimal permanent of an n X n symmetric Toeplitz matrix using the integers 1 to n.

Original entry on oeis.org

1, 1, 5, 36, 480, 9991, 296913, 12099604, 637590728, 43090005714, 3550491371994, 359557627057876
Offset: 0

Views

Author

Stefano Spezia, Jan 29 2022

Keywords

Examples

			a(3) = 36:
    2    1    3
    1    2    1
    3    1    2
a(4) = 480:
    2    1    3    4
    1    2    1    3
    3    1    2    1
    4    3    1    2
a(5) = 9991:
    3    1    2    4    5
    1    3    1    2    4
    2    1    3    1    2
    4    2    1    3    1
    5    4    2    1    3
		

Crossrefs

Cf. A204235, A307783, A350937, A351020 (maximal).

Programs

  • Python
    from itertools import permutations
    from sympy import Matrix
    def A351019(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(range(1,n+1))) # Chai Wah Wu, Jan 31 2022

Extensions

a(9) from Alois P. Heinz, Jan 31 2022
a(10)-a(11) from Lucas A. Brown, Sep 06 2022

A356481 a(n) is the hafnian of a symmetric Toeplitz matrix M(2*n) whose first row consists of 1, 2, ..., 2*n.

Original entry on oeis.org

1, 2, 21, 532, 24845, 1856094, 203076097, 30633787976, 6097546660185, 1548899852221210, 489114616743840461
Offset: 0

Views

Author

Stefano Spezia, Aug 09 2022

Keywords

Examples

			a(2) = 21 because the hafnian of
    1  2  3  4
    2  1  2  3
    3  2  1  2
    4  3  2  1
equals M_{1,2}*M_{3,4} + M_{1,3}*M_{2,4} + M_{1,4}*M_{2,3} = 21.
		

Crossrefs

Cf. A001792 (absolute value of the determinant of M(n)), A204235 (permanent of M(n)).

Programs

  • Mathematica
    k[i_]:=i; M[i_, j_, n_]:=Part[Part[ToeplitzMatrix[Array[k, n]], i], j]; a[n_]:=Sum[Product[M[Part[PermutationList[s, 2n], 2i-1], Part[PermutationList[s, 2n], 2i], 2n], {i, n}], {s, SymmetricGroup[2n]//GroupElements}]/(n!*2^n); Array[a, 6, 0]
  • PARI
    tm(n) = my(m = matrix(n, n, i, j, if (i==1, j, if (j==1, i)))); for (i=2, n, for (j=2, n, m[i, j] = m[i-1, j-1]; ); ); m;
    a(n) = my(m = tm(2*n), s=0); forperm([1..2*n], p, s += prod(j=1, n, m[p[2*j-1], p[2*j]]); ); s/(n!*2^n); \\ Michel Marcus, May 02 2023

Extensions

a(6) from Michel Marcus, May 02 2023
a(7)-a(10) from Pontus von Brömssen, Oct 14 2023

A307783 The permanent of an n X n symmetric Toeplitz matrix M(n) whose first row consists of n, n-1, ..., 1.

Original entry on oeis.org

1, 5, 62, 1472, 57228, 3300052, 264163120, 28004426240, 3796084024832, 640290996560896, 131495036625989504, 32300689159458652160, 9350873610168606862080, 3150550820854335942423808, 1222211647879605626853439488, 540858935979668390014623285248, 270804098518125729769134021574656
Offset: 1

Views

Author

Stefano Spezia, Apr 28 2019

Keywords

Comments

The matrix M(n) differs from that of A204235 in using for the first row the positive integers 1, 2,..., n in decreasing order in place of in increasing order (see examples).
The trace of the matrix M(n) is A000290(n).
The determinant of the matrix M(n) is A001792(n-1).
The sum of the k-th row of the matrix M(n) is A008867(n,k).
For n > k, the sum of the k-diagonal of the matrix M(n) is A055461(n,k).

Examples

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

Crossrefs

Programs

  • Maple
    f:= proc(n) uses LinearAlgebra; Permanent(ToeplitzMatrix([i, i=n..1, -1)])) end proc: map(f, [$1..17]);
  • Mathematica
    b[i_]:=i; a[n_]:=Permanent[ToeplitzMatrix[Reverse[Array[b, n]], Reverse[Array[b, n ]]]]; Array[a, 17]
  • PARI
    {a(n) = matpermanent(matrix(n, n, i, j, n + 1 - max(i - j + 1, j - i + 1)))}
    for(n=1, 20, print1(a(n), ", ")) \\ Vaclav Kotesovec, Apr 29 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

A359560 a(n) is the permanent of an n X n Hermitian Toeplitz matrix whose first row consists of 1, 2*i, ..., n*i, where i denotes the imaginary unit.

Original entry on oeis.org

1, 1, 5, 18, 360, 2800, 151424, 1926704, 218991568, 3961998320, 815094714320, 19339258670304, 6524060415099520, 192715406460607360, 99364368150722162944, 3525158026102570745600, 2635328330670632415828224, 109381927750670379873854720, 113797518402277434839782802688
Offset: 0

Views

Author

Stefano Spezia, Jan 06 2023

Keywords

Examples

			a(3) = 18:
  [   1,  2*i, 3*i;
   -2*i,    1, 2*i;
   -3*i, -2*i,   1 ]
		

Crossrefs

Cf. A143182, A204235 (symmetric Toeplitz matrix).
Cf. A359559 (determinant), A359561, A359562.
Cf. A359614 (minimal), A359615 (maximal).

Programs

  • Maple
    A359560 := proc(n)
        local T,c,r ;
        if n =0 then
            return 1 ;
        end if;
        T := Matrix(n,n,shape=hermitian) ;
        T[1,1] := 1 ;
        for c from 2 to n do
            T[1,c] := c*I ;
        end do:
        for r from 2 to n do
            for c from r to n do
                T[r,c] := T[r-1,c-1] ;
            end do:
        end do:
        LinearAlgebra[Permanent](T) ;
        simplify(%) ;
    end proc:
    seq(A359560(n),n=0..15) ; # R. J. Mathar, Jan 31 2023
  • Mathematica
    Join[{1},Table[Permanent[ToeplitzMatrix[Join[{1},I Range[2,n]]]],{n,18}]]
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, if (i==j, 1, if (iMichel Marcus, Jan 20 2023
    
  • Python
    from sympy import Matrix, I
    def A359560(n): return Matrix(n,n,[i-j+(1 if i>j else -1) if i!=j else I for i in range(n) for j in range(n)]).per()*(1,-I,-1,I)[n&3] if n else 1 # Chai Wah Wu, Jan 25 2023

Formula

A359614(n) <= a(n) <= A359615(n).

A204436 Permanent of the n-th principal submatrix of A204435.

Original entry on oeis.org

1, 1, 1, 2, 6, 16, 80, 384, 1728, 12096, 82080, 525312, 4783104, 41886720, 349056000, 3891456000, 41803776000, 429981696000, 5667397632000, 72153317376000, 883878137856000, 13437405757440000, 197840194965504000, 2813727217287168000, 48450827875516416000
Offset: 0

Views

Author

Clark Kimberling, Jan 15 2012

Keywords

Comments

Also the number of permutations pi in S_n such that pi(i) + i != 0 (mod 3) for all i. - Peter Kagey, Jan 25 2021

Crossrefs

Cf. A204235.

Programs

  • Mathematica
    f[i_, j_] := Mod[(i + j)^2, 3];
    m[n_] := Table[f[i, j], {i, 1, n}, {j, 1, n}]
    TableForm[m[8]] (* 8x8 principal submatrix *)
    Flatten[Table[f[i, n + 1 - i],
      {n, 1, 14}, {i, 1, n}]]       (* A204435 *)
    Join[{1},Table[Permanent[m[n]], {n, 1, 22}]]   (* A204436 *)

Extensions

a(0) and a(23)-a(24) from Pontus von Brömssen, Jan 29 2021

A323255 The permanent 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, 1, 11, 248, 9968, 638772, 60061657, 7798036000, 1336715859150, 292406145227392, 79483340339739367, 26280500564448081664, 10386012861097225139356, 4834639222955142417477888, 2618110215141486526589786501, 1631888040186649673361825042432, 1159983453675106278249250918734938
Offset: 0

Views

Author

Stefano Spezia, Jan 09 2019

Keywords

Comments

The trace of the matrix M(n) is A000384(n).
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 permanent a(1) = 1.
For n = 2 the matrix M(2) is
   3, 1
   2, 3
with permanent a(2) = 11.
For n = 3 the matrix M(3) is
   5, 2, 1
   4, 5, 2
   3, 4, 5
with permanent a(3) = 248.
		

Crossrefs

Cf. A323254 (determinant of matrix M(n)).

Programs

  • Mathematica
    b[i_]:=i; a[n_]:=If[n==0, 1, Permanent[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, 16, 0]
  • 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) = matpermanent(tm(n)); \\ Stefano Spezia, Dec 11 2019

Extensions

a(0) = 1 prepended by Stefano Spezia, Dec 08 2019
Showing 1-8 of 8 results.