OFFSET
1,42
COMMENTS
Clearly p is odd if p and p + 2 are twin primes. If sigma is a permutation of {1,...,n}, and i + sigma (i) and i + sigma(i) + 2 are twin primes for all i = 1,...,n, then we must have sum_{i=1}^n (i + sigma(i)) == n (mod 2) and hence n is even. Therefore a(n) = 0 if n is odd.
Zhi-Wei Sun made the following general conjecture:
Let d be any positive even integer, and let D(d,n) be the n X n determinant with (i,j)-entry eual to 1 or 0 according as i + j and i + j + d are both prime or not. Then D(d,2*n) is nonzero for large n.
Note that when n is odd we have D(d,n) = 0 (just like a(n) = 0). Also, the conjecture implies de Polignac's conjecture that there are infinitely many primes p such that p and p + d are both prime.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..300
EXAMPLE
a(1) = 0 since {2, 4} is not a twin prime pair.
MATHEMATICA
a[n_]:=a[n]=Det[Table[If[PrimeQ[i+j]==True&&PrimeQ[i+j+2]==True, 1, 0], {i, 1, n}, {j, 1, n}]]
Table[a[n], {n, 1, 100}]
CROSSREFS
KEYWORD
sign
AUTHOR
Zhi-Wei Sun, Aug 25 2013
STATUS
approved