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

A067276 Determinant of n X n matrix containing the first n^2 primes in increasing order.

Original entry on oeis.org

2, -1, -78, 880, -4656, -14304, -423936, 8342720, 711956736, -615707136, 21057138688, -4663930678272, 211912980656128, -9178450735677440, 40005919124799488, 83013253447139328, -8525111273818357760, -800258888289188708352, -15170733077495639179264
Offset: 1

Views

Author

Rick L. Shepherd, Feb 21 2002

Keywords

Comments

The first column contains the first n primes in increasing order, the second column contains the next n primes in increasing order, etc. Equivalently, first row contains first n primes in increasing order, second row contains next n primes in increasing order, etc. Sequences of determinants of matrices specifically containing primes include A024356 (Hankel matrix), A067549 (first n primes on diagonal, other elements 1), A066933 (cyclic permutations of first n primes in each row) and A067551 (first n primes on diagonal, other elements 0).

Examples

			a(3) = -78 because det[[2,7,17],[3,11,19],[5,13,23]] = -78 (= det[[2,3,5],[7,11,13],[17,19,23]], the determinant of the transpose.).
		

Crossrefs

Programs

  • Magma
    [ Determinant( Matrix(n, n, [ NthPrime(k): k in [1..n^2] ]) ): n in [1..19] ]; // Klaus Brockhaus, May 12 2010
    
  • Maple
    seq(LinearAlgebra:-Determinant(Matrix(n,n,(i,j) -> ithprime(n*(i-1)+j))),n=1..20); # Robert Israel, Jul 12 2017
  • Mathematica
    Table[ Det[ Partition[ Array[Prime, n^2], n]], {n, 19}] (* Robert G. Wilson v, May 26 2006 *)
  • PARI
    for(n=1,20,k=0; m=matrix(n,n,x,y, prime(k=k+1)); print1(matdet(m), ", ")) /* The matrix initialization command above fills columns first: Variables (such as) x and y take on values 1 through n for rows and columns, respectively, with x changing more rapidly and they must be specified even though the 5th argument is not an explicit function of them here. */
    
  • Python
    from sympy.matrices import Matrix
    from sympy import sieve
    def a(n):
        sieve.extend_to_no(n**2)
        return Matrix(n, n, sieve[1:n**2+1]).det()
    print([a(n) for n in range(1, 20)]) # Indranil Ghosh, Jul 31 2017

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

A092419 Let k = n-th nonsquare = A000037(n); then a(n) = smallest prime p such that the Kronecker-Jacobi symbol K(k,p) = -1.

Original entry on oeis.org

3, 2, 2, 7, 5, 3, 7, 2, 5, 2, 3, 13, 3, 5, 2, 3, 2, 5, 3, 7, 3, 2, 5, 2, 11, 7, 3, 5, 7, 2, 2, 3, 11, 7, 3, 5, 2, 3, 2, 11, 3, 5, 3, 2, 5, 2, 7, 7, 3, 5, 5, 2, 13, 2, 3, 5, 3, 7, 2, 3, 2, 13, 3, 5, 5, 3, 2, 7, 2, 5, 11, 3, 5, 2, 11, 2, 3, 5, 5, 3, 7, 2, 3, 2, 7, 3, 7, 5, 3, 2, 2, 5, 5, 3, 11, 11, 2, 5, 2, 3, 7
Offset: 1

Views

Author

N. J. A. Sloane, Oct 16 2008

Keywords

Comments

Maple calls K(k,p) the Legendre symbol.
The old entry with this sequence number was a duplicate of A024356.

References

  • H. Cohen, A Course in Computational Number Theory, Springer, 1996 (p. 28 defines the Kronecker-Jacobi symbol).

Crossrefs

Cf. A000037. Records: A067073, A070040. See A144294 for another version.

Programs

  • Maple
    with(numtheory); f:=proc(n) local M,i,j,k; M:=100000; for i from 1 to M do if legendre(n,ithprime(i)) = -1 then RETURN(ithprime(i)); fi; od; -1; end;
  • PARI
    a(n)=my(k=n+(sqrtint(4*n)+1)\2); forprime(p=2,, if(kronecker(k,p)<0, return(p))) \\ Charles R Greathouse IV, Aug 28 2016

Extensions

Definition corrected Dec 03 2008

A290302 Permanent of Hankel matrix of the first 2n-1 prime numbers.

Original entry on oeis.org

1, 2, 19, 642, 52046, 8012520, 1939769432, 718866359440, 368802888131376, 259389489641608736, 238655237778415792704, 270892331023142039759488, 377446142834845276550334720, 626883335555480085495326908416, 1230454868521341442901679438859264
Offset: 0

Views

Author

Alois P. Heinz, Jul 26 2017

Keywords

Crossrefs

Cf. A024356.

Programs

  • Maple
    with(LinearAlgebra):
    a:= n-> `if`(n=0, 1, Permanent(Matrix(n, (i, j)-> ithprime(i+j-1)))):
    seq(a(n), n=0..16);
  • Mathematica
    a[n_]:=Permanent[Table[Prime[i+j-1],{i,n},{j,n}]]; Join[{1}, Array[a, 14]] (* Stefano Spezia, Feb 03 2024 *)

A369946 a(n) is the minimal determinant of an n X n Hankel matrix using the first 2*n - 1 prime numbers.

Original entry on oeis.org

1, 2, -19, -1115, -57935, -5696488, -2307021183
Offset: 0

Views

Author

Stefano Spezia, Feb 06 2024

Keywords

Examples

			a(2) = -19:
  2, 5;
  5, 3.
a(3) = -1115:
   3,  7, 11;
   7, 11,  2;
  11,  2,  5.
a(4) = -57935:
   7,  5, 17,  2;
   5, 17,  2,  3;
  17,  2,  3, 11;
   2,  3, 11, 13.
		

Crossrefs

Cf. A369947 (maximal), A350933 (maximal absolute value), A369949, A350939 (minimal permanent).

Programs

  • Mathematica
    a[n_] := Min[Table[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]]
  • PARI
    a(n) = my(v=[1..2*n-1], m=+oo, d); forperm(v, p, d = matdet(matrix(n, n, i, j, prime(p[i+j-1]))); if (dMichel Marcus, Feb 08 2024
    
  • Python
    from itertools import permutations
    from sympy import primerange, prime, Matrix
    def A369946(n): return min(Matrix([p[i:i+n] for i in range(n)]).det() 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

A369947 a(n) is the maximal determinant of an n X n Hankel matrix using the first 2*n - 1 prime numbers.

Original entry on oeis.org

1, 2, 11, 286, 86087, 9603283, 1764195984
Offset: 0

Views

Author

Stefano Spezia, Feb 06 2024

Keywords

Examples

			a(2) = 11:
  3, 2;
  2, 5.
a(3) = 286:
   3, 11, 5;
  11,  5, 7;
   5,  7, 2.
a(4) = 86087:
   7,  3, 13, 17;
   3, 13, 17,  2;
  13, 17,  2, 11;
  17,  2, 11,  5.
		

Crossrefs

Cf. A369946 (minimal), A350933 (maximal absolute value), A369949, A350940 (maximal permanent).

Programs

  • Mathematica
    a[n_] := Max[Table[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]]
  • PARI
    a(n) = my(v=[1..2*n-1], m=-oo, d); forperm(v, p, d = 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 primerange, prime, Matrix
    def A369947(n): return max(Matrix([p[i:i+n] for i in range(n)]).det() 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

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

Original entry on oeis.org

1, 1, 3, 59, 2459, 174063, 19141721
Offset: 0

Views

Author

Stefano Spezia, Feb 06 2024

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := CountDistinct[Table[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]]
  • PARI
    a(n) = my(v=[1..2*n-1], list=List()); forperm(v, p, listput(list, matdet(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 A369949(n): return len({Matrix([p[i:i+n] for i in range(n)]).det() 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

A108078 Determinant of a Hankel matrix with factorial elements.

Original entry on oeis.org

1, 2, 12, 576, 414720, 7166361600, 4334215495680000, 125824009525788672000000, 230121443546659694208614400000000, 33669808475874225917238947767910400000000000, 487707458060712424140716248549520230160793600000000000000
Offset: 0

Views

Author

Paul Max Payton, Jun 03 2005

Keywords

Comments

The term (n=1) is a degenerate case, a matrix with single element 2. This sequence involves products of binomial coefficients and is related to the superfactorial function.

References

  • M. J. C. Gover, "The Explicit Inverse of Factorial Hankel Matrices", Department of Mathematics, University of Bradford, 1993

Crossrefs

Programs

  • MATLAB
    % the sequence is easily made by:
    for i=1:n det(gallery('ipjfact',i,0)) end
    % or, more explicitly, by:
    d = 1; for i=1:n-1 d = d*factorial(i+1)*factorial(n-i); end d = d*factorial(n+1);
  • Maple
    with(LinearAlgebra):
    a:= n-> Determinant(Matrix(n, (i,j)->(i+j)!)):
    seq(a(n), n=0..10);  # Alois P. Heinz, Dec 05 2015
    # second Maple program:
    a:= n-> (n+1)! * mul((i+1)!*(n-i)!, i=1..n-1):
    seq(a(n), n=0..10);  # Alois P. Heinz, Dec 05 2015
  • Mathematica
    A108078[n_]:=Det[Table[(i+j)!,{i,1,n},{j,1,n}]]; Array[A108078, 20] (* Enrique Pérez Herrero, May 20 2011 *)
    Table[BarnesG[n + 1] BarnesG[n + 3], {n, 20}] (* Jan Mangaldan, May 22 2016 *)

Formula

a(n) = (n+1)! * Product_{i=1..n-1} (i+1)! * (n-i)!.
a(n) = A059332(n)*(n+1)!.
a(n) ~ n^(n^2 + 2*n + 11/6) * 2^(n+1) * Pi^(n+1) / (A^2 * exp(3*n^2/2 + 2*n - 1/6)), where A = A074962 is the Glaisher-Kinkelin constant. - Vaclav Kotesovec, Apr 16 2016
a(n) = G(n+1) * G(n+3), where G(n) is the Barnes G function. - Jan Mangaldan, May 22 2016

Extensions

a(0)=1 prepended and some terms corrected by Alois P. Heinz, Dec 05 2015

A350200 Array read by antidiagonals: T(n,k) is the determinant of the Hankel matrix of the 2*n-1 consecutive primes starting at the k-th prime, n >= 0, k >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 5, -4, -2, 1, 7, 6, 12, 0, 1, 11, -30, -72, 144, 288, 1, 13, 18, 72, 0, 576, -1728, 1, 17, -42, -72, 288, 1152, -7104, -26240, 1, 19, 30, -96, 144, -1248, -11712, 45248, 222272, 1, 23, 22, -188, 488, -112, -11360, 21184, 450432, 1636864
Offset: 0

Views

Author

Pontus von Brömssen, Dec 19 2021

Keywords

Examples

			Array begins:
  n\k|      1      2       3       4       5       6       7       8
  ---+--------------------------------------------------------------
   0 |      1      1       1       1       1       1       1       1
   1 |      2      3       5       7      11      13      17      19
   2 |      1     -4       6     -30      18     -42      30      22
   3 |     -2     12     -72      72     -72     -96    -188    -480
   4 |      0    144       0     288     144     488    1800    2280
   5 |    288    576    1152   -1248    -112    4432   -1552   15952
   6 |  -1728  -7104  -11712  -11360  -10816   29952  -89152  -57088
   7 | -26240  45248   21184 -103168  -43264 -605440 -379264  271552
   8 | 222272 450432 1068800 2022912 3927552 5399552 6315904 6861312
T(3,2) = 12, the determinant of the Hankel matrix
  [3  5  7]
  [5  7 11]
  [7 11 13].
		

Crossrefs

Cf. A350201.
Cf. A000012 (row n = 0), A000040 (row n = 1), A056221 (row n = 2 with opposite sign), A024356 (column k = 1), A071543 (column k = 2).

Programs

  • Python
    from sympy import Matrix,prime,nextprime
    def A350200(n,k):
        p = [prime(k)] if n > 0 else []
        for i in range(2*n-2): p.append(nextprime(p[-1]))
        return Matrix(n,n,lambda i,j:p[i+j]).det()

Extensions

Offset corrected by Pontus von Brömssen, Aug 25 2022
Showing 1-9 of 9 results.