OFFSET
1,1
COMMENTS
Let P = {3,5,7,11,...} be the sequence of odd primes and let P(k) = {prime in P: (prime+2k) is in P} (although set builder notation is used for P(k) we will still assume that P(k) is a sequence). Let M(n) be the n X n matrix where row 1 is the first n elements from P(1), row 2 is the first n elements from P(2), and in general row j is the first n elements from P(j). This sequence is the sequence of determinants for M(1), M(2), M(3), M(4), ..., M(9).
LINKS
Jinyuan Wang, Table of n, a(n) for n = 1..200
Samuel J. Erickson, Python Code
Sachin Joglekar, Determinant of matrix of any order (Python)
EXAMPLE
For the first element of the sequence we find the determinant of the matrix [[3,5],[3,7]], where [3,5] is row 1 and [3,7] is row 2. These numbers are there because in row 1 we are looking at the primes where we can add 2 to get another prime; 3+2 is prime and so is 5+2, so they go in row 1. Similarly, for the second row we get [3,7] because these are the first primes such that when 4 is added we get a prime: 3+4 and 7+4 are both prime, so they go in row 2. For the second entry in the sequence we take the determinant of [[3,5,11],[3,7,13],[5,7,11]]; the reason we get [5,7,11] in the third row is because 5 is the first prime where 5+6 is prime, 7 is second prime where 7+6 is prime, and 11 is the third prime where 11+6 is prime.
PROG
(Python) # See Erickson link.
(PARI) a(n) = {my(m=matrix(n, n), j); for (i=1, n, j = 1; forprime(p=2, , if (isprime(p+2*i), m[i, j] = p; j++); if (j > n, break); ); ); matdet(m); } \\ Michel Marcus, May 04 2019
CROSSREFS
KEYWORD
sign
AUTHOR
Samuel J. Erickson, Aug 06 2014
EXTENSIONS
Offset 1 and more terms from Michel Marcus, May 04 2019
STATUS
approved