A228559 Determinant of the n X n matrix with (i,j)-entry equal to 1 or 0 according as i + j is a Sophie Germain prime or not.
1, -1, -1, 1, 0, -1, -1, 1, 1, -1, 0, 1, 1, -1, -4, 16, 0, -64, -64, 64, 0, 0, 0, 0, 0, -64, -64, 64, 0, -16, -4, 1, 1, -1, 0, 4, 16, -64, -144, 324, 0, -81, -9, 1, 4, -16, 0, 64, 64, -64, 0, 0, 0, 0, 0, 262144, 4194304, -67108864, 0, 1073741824
Offset: 1
Keywords
Examples
a(1) = 1 since 1 + 1 is a Sophie Germain prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..300
Crossrefs
Programs
-
Mathematica
a[n_]:=a[n]=Det[Table[If[PrimeQ[i+j]==True&&PrimeQ[2(i+j)+1]==True,1,0],{i,1,n},{j,1,n}]] Table[a[n],{n,1,20}] Det/@Table[If[AllTrue[{i+j,2(i+j)+1},PrimeQ],1,0],{n,60},{i,n},{j,n}] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, May 26 2017 *)
Comments