%I #27 Jan 22 2022 00:08:50
%S 1,-3,-8,49,-24,-960,-48,-3375,676,-8640,-120,-2247392,-168,-34560,
%T -46080,923521,-288,-28789488,-360,-54867456,-184320,-216000,-528,
%U -89384770560,15376,-423360,-512000,-438939648,-840,-558786571200,-960,-992436543,-1152000
%N Determinant of the circulant matrix whose first column corresponds to the divisors of n.
%C From _Robert Israel_, Mar 06 2019: (Start)
%C a(n) is divisible by A000203(n).
%C If n is not a square, a(n) is divisible by A000203(n)*A071324(n).
%C (End)
%H Robert Israel, <a href="/A306598/b306598.txt">Table of n, a(n) for n = 1..10000</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Circulant_matrix">Circulant matrix</a>
%F Apparently, a(n) > 0 iff n is a square.
%F a(p) = p^2 - 1 for any prime number p.
%F a(p^2) = p^6 - 2*p^3 + 1 for any prime number p.
%F a(2^k) = A086459(k+1) for any k >= 0.
%F If p < q are primes, a(p*q) = -(p^4-1)*(q^2-1)^2. - _Robert Israel_, Mar 06 2019
%e For n = 12:
%e - the divisors of 12 are: 1, 2, 3, 4, 6, 12,
%e - the corresponding circulant matrix is:
%e [ 1 12 6 4 3 2]
%e [ 2 1 12 6 4 3]
%e [ 3 2 1 12 6 4]
%e [ 4 3 2 1 12 6]
%e [ 6 4 3 2 1 12]
%e [12 6 4 3 2 1]
%e - its determinant is -2247392,
%e - hence, a(12) = -2247392.
%p f:= proc(n) local F,d; uses numtheory, LinearAlgebra;
%p F:= sort(convert(divisors(n),list));
%p d:= nops(F);
%p Determinant(Matrix(d,d,shape=Circulant[F]))
%p end proc:
%p map(f, [$1..100]); # _Robert Israel_, Mar 06 2019
%t a[n_] := Module[{dd = Divisors[n], m, r}, m = Length[dd]; r = E^(2 Pi I/m); Product[Sum[dd[[j+1]] r^(j k), {j, 0, m-1}], {k, 0, m-1}] // FullSimplify];
%t Array[a, 100] (* _Jean-François Alcover_, Oct 17 2020 *)
%o (PARI) a(n) = my (d=divisors(n)); my (m=matrix(#d, #d, i,j, d[1+(i-j)%#d])); return (matdet(m))
%Y Cf. A027750, A086459, A177894.
%K sign,look
%O 1,2
%A _Rémy Sigrist_, Feb 27 2019