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-5 of 5 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

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

Original entry on oeis.org

1, 1, 16, 714, 62528, 9056720, 1960138560, 592615689904, 238560786221056, 123358665203311104, 79683847063011614720
Offset: 0

Views

Author

Stefano Spezia, Aug 09 2022

Keywords

Examples

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

Crossrefs

Cf. A001792 (determinant of M(n)), A307783.

Programs

  • Mathematica
    k[i_]:=i; M[i_, j_, n_]:=Part[Part[ToeplitzMatrix[Reverse[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, n-j+1, 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) = 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

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

Original entry on oeis.org

1, 1, 3, 0, -256, -5000, -46656, 941192, 67108864, 2066242608, 24000000000, -1659995174464, -142657607172096, -5964309791355136, -76196618232397824, 11210083593750000000, 1180591620717411303424, 62286325600853591655680, 839390038939659468275712, -213252813410122222659258368
Offset: 0

Views

Author

Stefano Spezia, Jan 06 2023

Keywords

Examples

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

Crossrefs

Cf. A307783 (symmetric Toeplitz matrix).
Cf. A359559, A359560, A359562 (permanent).
Cf. A359616 (minimal), A359617 (maximal).

Programs

  • Maple
    A359561 := proc(n)
        local T,c,r ;
        if n =0 then
            return 1 ;
        end if;
        T := Matrix(n,n) ;
        T[1,1] := n ;
        for c from 2 to n do
            T[1,c] := (n-c+1)*I ;
        end do:
        for r from 2 to n do
            for c from 1 to r-1 do
                T[r,c] := -T[c,r] ;
            end do:
            for c from r to n do
                T[r,c] := T[r-1,c-1] ;
            end do:
        end do:
        LinearAlgebra[Determinant](T) ;
        simplify(%) ;
    end proc:
    seq(A359561(n),n=0..25) ; # R. J. Mathar, Jan 31 2023
  • Mathematica
    Join[{1},Table[Det[ToeplitzMatrix[Join[{n},I Reverse[Range[n-1]]]]],{n,19}]]
  • Python
    from sympy import Matrix, I
    def A359561(n): return Matrix(n,n,[(n+j-i if i>j else j-i-n) if i!=j else n*I for i in range(n) for j in range(n)]).det()*(1,-I,-1,I)[n&3] # Chai Wah Wu, Jan 25 2023

Formula

A359616(n) <= a(n) <= A359617(n).

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

Original entry on oeis.org

1, 1, 5, 54, 980, 26000, 977844, 48486480, 3168454720, 257625275760, 26347709832000, 3217348801257888, 477582176242255104, 82066363639286366080, 16709994767104962690304, 3847766849105116759200000, 1029727509567022262979280896, 306114655769763238348323419392, 104188715467117934409088054935552
Offset: 0

Views

Author

Stefano Spezia, Jan 06 2023

Keywords

Examples

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

Crossrefs

Cf. A307783 (symmetric Toeplitz matrix).
Cf. A359559, A359560, A359561 (determinant).
Cf. A359616 (minimal), A359617 (maximal).

Programs

  • Mathematica
    Join[{1},Table[Permanent[ToeplitzMatrix[Join[{n},I Reverse[Range[n-1]]]]],{n,18}]]
  • Python
    from sympy import Matrix, I
    def A359562(n): return Matrix(n,n,[(n+j-i if i>j else j-i-n) if i!=j else n*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

A359616(n) <= a(n) <= A359617(n).
Showing 1-5 of 5 results.