A228624 Determinant of the n X n matrix with (i,j)-entry equal to 1 or 0 according as i + j is a square or not.
0, 0, -1, 0, 1, 0, 0, 1, 1, 1, 0, -1, 1, 0, 0, -1, 2, 3, -3, -1, 0, 1, -1, -2, -5, 13, -7, -7, -6, 1, 8, -1, -17, 25, 13, -12, 11, 12, -11, -12, -4, 1, 1, -66, -60, -26, -13, 40, -67, -1, 82, 81, -49, -32, 68, 103, -222, 503, -39, -134
Offset: 1
Keywords
Examples
a(1) = 0 since 1 + 1 = 2 is not a square.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..400
Programs
-
Mathematica
SQ[n_]:=IntegerQ[Sqrt[n]] a[n_]:=Det[Table[If[SQ[i+j]==True,1,0],{i,1,n},{j,1,n}]] Table[a[n],{n,1,30}]
-
PARI
a(n)=matdet(matrix(n,n,i,j,issquare(i+j))) \\ Ralf Stephan, Sep 17 2013
Comments