A067276 Determinant of n X n matrix containing the first n^2 primes in increasing order.
2, -1, -78, 880, -4656, -14304, -423936, 8342720, 711956736, -615707136, 21057138688, -4663930678272, 211912980656128, -9178450735677440, 40005919124799488, 83013253447139328, -8525111273818357760, -800258888289188708352, -15170733077495639179264
Offset: 1
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.).
Links
- Robert Israel, Table of n, a(n) for n = 1..459
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
Comments