login
Determinant of the n X n matrix with (i,j)-entry equal to 1 or 0 according as i + j is coprime to n or not.
2

%I #17 Aug 26 2021 03:24:42

%S 1,-1,-2,0,4,-4,-6,0,0,-16,-10,0,12,-36,-2048,0,16,0,-18,0,27648,-100,

%T -22,0,0,-144,0,0,28,-4194304,-30,0,2048000,-256,-127401984,0,36,-324,

%U -14155776,0,40,-764411904,-42,0,0,-484,-46,0,0,0,-536870912,0,52,0,-419430400000,0,3057647616,-784,-58,0

%N Determinant of the n X n matrix with (i,j)-entry equal to 1 or 0 according as i + j is coprime to n or not.

%C Conjecture: If n is squarefree, then (-1)^(n*(n-1)/2)*a(n) > 0.

%C When p^2 divides n with p prime, (i + n/p) + j is coprime to n if and only if i + j is coprime to n. So a(n) = 0 if n is not squarefree.

%C It is easy to show that Phi(n) divides a(n) for any n > 0, where Phi(n) is Euler's totient function. Also, a(p) = (-1)^((p-1)/2)*(p-1) for any odd prime p.

%H Zhi-Wei Sun, <a href="/A228885/b228885.txt">Table of n, a(n) for n = 1..500</a>

%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1308.2900">On some determinants with Legendre symbol entries</a>, preprint, arXiv:1308.2900 [math.NT], 2013-2019.

%e a(1) = 1 since 1 + 1 = 2 is relatively prime to 1.

%t a[n_]:=Det[Table[If[GCD[i+j,n]==1,1,0],{i,1,n},{j,1,n}]]

%t Table[a[n],{n,1,60}]

%o (PARI) a(n) = matdet(matrix(n, n, i, j, gcd(n, i+j)==1)); \\ _Michel Marcus_, Aug 25 2021

%Y Cf. A228860, A228884.

%K sign

%O 1,3

%A _Zhi-Wei Sun_, Sep 06 2013