A306595 Determinant of the circulant matrix whose first column corresponds to the binary digits of n.
0, 1, 1, 0, 1, 2, 2, 0, 1, 0, 0, 3, 0, -3, 3, 0, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 0, 1, 0, 4, 0, 0, -9, 9, 0, 4, 9, 0, 8, 9, 0, 8, 5, 0, 0, 9, 0, -9, -8, 0, -5, 0, 0, 8, 5, 0, -5, 5, 0, 1, 2, 2, 3, 2, 24, 24, 4, 2, 3, 3, 32, 3, 4, 32, 5, 2, 24, 3
Offset: 0
Examples
For n = 13: - the binary representation of 13 is "1101", - the corresponding circulant matrix is: [1 1 0 1] [1 1 1 0] [0 1 1 1] [1 0 1 1] - its determinant is -3, - hence a(13) = -3.
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
- Wikipedia, Circulant matrix
- Index entries for sequences related to binary expansion of n
Programs
-
Maple
a:= n-> `if`(n=1, 1, (l-> LinearAlgebra[Determinant](Matrix(nops(l), shape=Circulant[l[-i]$i=1..nops(l)])))(convert(n, base, 2))): seq(a(n), n=0..100); # Alois P. Heinz, Mar 05 2019
-
PARI
a(n) = my (d=if (n, binary(n), [0])); my (m=matrix(#d, #d, i,j, d[1+(i-j)%#d])); return (matdet(m))
Comments