OFFSET
1,2
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Wikipedia, Circulant matrix
FORMULA
Apparently, a(n) > 0 iff n is a square.
a(p) = p^2 - 1 for any prime number p.
a(p^2) = p^6 - 2*p^3 + 1 for any prime number p.
a(2^k) = A086459(k+1) for any k >= 0.
If p < q are primes, a(p*q) = -(p^4-1)*(q^2-1)^2. - Robert Israel, Mar 06 2019
EXAMPLE
For n = 12:
- the divisors of 12 are: 1, 2, 3, 4, 6, 12,
- the corresponding circulant matrix is:
[ 1 12 6 4 3 2]
[ 2 1 12 6 4 3]
[ 3 2 1 12 6 4]
[ 4 3 2 1 12 6]
[ 6 4 3 2 1 12]
[12 6 4 3 2 1]
- its determinant is -2247392,
- hence, a(12) = -2247392.
MAPLE
f:= proc(n) local F, d; uses numtheory, LinearAlgebra;
F:= sort(convert(divisors(n), list));
d:= nops(F);
Determinant(Matrix(d, d, shape=Circulant[F]))
end proc:
map(f, [$1..100]); # Robert Israel, Mar 06 2019
MATHEMATICA
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];
Array[a, 100] (* Jean-François Alcover, Oct 17 2020 *)
PROG
(PARI) a(n) = my (d=divisors(n)); my (m=matrix(#d, #d, i, j, d[1+(i-j)%#d])); return (matdet(m))
CROSSREFS
KEYWORD
sign,look
AUTHOR
Rémy Sigrist, Feb 27 2019
STATUS
approved