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.

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

A350858 Minimal permanent of an n X n matrix whose elements are a permutation of the first n^2 prime numbers.

Original entry on oeis.org

1, 2, 29, 3664, 1820642, 2276752048, 5697057180536
Offset: 0

Views

Author

Stefano Spezia, Jan 19 2022

Keywords

Examples

			a(2) = 29:
    2    3
    5    7
a(3) = 3664:
    2    3    5
    7   13   19
   11   17   23
		

Crossrefs

Cf. A114533, A180128, A350565, A350859 (maximal).

Programs

  • Python
    from itertools import permutations
    from sympy import Matrix
    def A350858(n): return 1 if n == 0 else min(Matrix(n,n,p).per() for p in permutations(prime(m) for m in range(1,n**2+1))) # Chai Wah Wu, Jan 21 2022

Extensions

a(4)-a(6) from Hugo Pfoertner, Jan 21 2022

A350859 Maximal permanent of an n X n matrix whose elements are a permutation of the first n^2 prime numbers.

Original entry on oeis.org

1, 2, 41, 11868, 12124850, 25767879812, 101120963518528
Offset: 0

Views

Author

Stefano Spezia, Jan 19 2022

Keywords

Examples

			a(2) = 41:
   5    2
   3    7
a(3) = 11868:
  23    5    3
   2   13   19
   7   17   11
		

Crossrefs

Cf. A114533, A180128, A350566, A350858 (minimal).

Programs

  • Python
    from itertools import permutations
    from sympy import Matrix
    def A350859(n): return 1 if n == 0 else max(Matrix(n,n,p).per() for p in permutations(prime(m) for m in range(1,n**2+1))) # Chai Wah Wu, Jan 21 2022

Extensions

a(4)-a(6) from Hugo Pfoertner, Jan 21 2022

A232773 Permanent of the n X n matrix with numbers 1,2,...,n^2 in order across rows.

Original entry on oeis.org

1, 1, 10, 450, 55456, 14480700, 6878394720, 5373548250000, 6427291156586496, 11157501095973529920, 26968983444160450560000, 87808164603589940623344000, 374818412822626584819196231680, 2050842983500342507649178541536000, 14112022767608502582976078751055052800
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> (-1)^n*add(n^k*Stirling1(n, n-k)*
            Stirling1(n+1, k+1)*(n-k)!*k!, k=0..n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Dec 02 2013
  • Mathematica
    Table[(-1)^n * Sum[n^k * StirlingS1[n, n-k] * StirlingS1[n+1, k+1] * (n-k)! * k!,{k,0,n}],{n,0,20}] (* Vaclav Kotesovec after Max Alekseyev, Nov 30 2013 *)
  • PARI
    a(n) = (-1)^n * sum(k=0,n, n^k * stirling(n,n-k) * stirling(n+1,k+1) * (n-k)! * k! ) /* Max Alekseyev, Nov 30 2013 */
    
  • Python
    from sympy.functions.combinatorial.numbers import stirling, factorial
    def A232773(n): return abs(sum(n**k*stirling(n,n-k,kind=1,signed=True)*stirling(n+1,k+1,kind=1,signed=True)*factorial(n-k)*factorial(k) for k in range(n+1))) # Chai Wah Wu, Mar 25 2025

Formula

a(n) = (-1)^n * Sum_{k=0..n} n^k * Stirling1(n,n-k) * Stirling1(n+1,k+1) * (n-k)! * k!. - Max Alekseyev, Nov 30 2013
Limit_{n->oo} a(n)^(1/n)/n^3 = exp(-2). - Vaclav Kotesovec, Nov 30 2013
a(n) = A232788(n)*n!!, where n!! = A006882(n) is the double-factorial. - M. F. Hasler, Nov 30 2013

Extensions

More terms from W. Edwin Clark, Nov 30 2013
a(0)=1 prepended by Alois P. Heinz, Dec 02 2013
Showing 1-4 of 4 results.