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

A024356 Determinant of Hankel matrix of the first 2n-1 prime numbers.

Original entry on oeis.org

1, 2, 1, -2, 0, 288, -1728, -26240, 222272, 1636864, -8434688, -61820416, 238704640, 544024576, 3294658560, -71814283264, 359994671104, 17294535000064, 302441193013248, -2311203985948672, -11313883306262528, -31078379553816576, 26574426771056230400
Offset: 0

Views

Author

Jeffrey Shallit, Jun 08 2000

Keywords

Comments

Determinant of n X n matrix with entries prime(X+Y-1).
a(0) = 1 by convention.
I conjecture that a(4) is the only zero. - Jon Perry, Mar 22 2004

Examples

			a(2) = 1 because det[[2,3],[3,5]] = 1.
From _Klaus Brockhaus_, May 12 2010: (Start)
a(5) = determinant(M) = 288 where M is the matrix
  [ 2  3  5  7 11]
  [ 3  5  7 11 13]
  [ 5  7 11 13 17]
  [ 7 11 13 17 19]
  [11 13 17 19 23] . (End)
		

Crossrefs

Cf. A290302.

Programs

  • Magma
    Hankel_prime:=function(n); M:=ScalarMatrix(n, 0); for j in [1..n] do for k in [1..n] do M[j, k]:=NthPrime(j+k-1); end for; end for; return M; end function; [ Determinant(Hankel_prime(n)): n in [0..22] ];
    [1] cat [ Determinant( SymmetricMatrix( &cat[ [ NthPrime(j+k-1): k in [1..j] ]: j in [1..n] ] ) ): n in [1..22] ]; // Klaus Brockhaus, May 12 2010
  • Mathematica
    a[n_]:=Det[Table[Prime[i+j-1],{i,n},{j,n}]]; Join[{1},Array[a, 20]] (* Stefano Spezia, Feb 03 2024 *)
  • PARI
    for (i=0,20,print1(","matdet(matrix(i,i,X,Y,prime(X+Y-1))))) \\ Jon Perry, Mar 22 2004
    

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

A369952 a(n) is the number of distinct values of the permanent of an n X n Hankel matrix using the first 2*n - 1 prime numbers.

Original entry on oeis.org

1, 1, 2, 59, 2493, 180932, 19939272
Offset: 0

Views

Author

Stefano Spezia, Feb 06 2024

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := CountDistinct[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]]
  • PARI
    a(n) = my(v=[1..2*n-1], list=List()); forperm(v, p, listput(list, matpermanent(matrix(n, n, i, j, prime(p[i+j-1]))));); #Set(list); \\ Michel Marcus, Feb 08 2024
    
  • Python
    from itertools import permutations
    from sympy import primerange, prime, Matrix
    def A369952(n): return len({Matrix([p[i:i+n] for i in range(n)]).per() for p in permutations(primerange(prime((n<<1)-1)+1))}) if n else 1 # Chai Wah Wu, Feb 12 2024

Extensions

a(6) from Michel Marcus, Feb 08 2024
Showing 1-4 of 4 results.