OFFSET
0,2
COMMENTS
The 1-dimensional (necklace) case is A000031.
We define a toroidal necklace to be an equivalence class of matrices under all possible rotations of the sequence of rows and the sequence of columns. Alternatively, a toroidal necklace is a matrix that is minimal among all possible rotations of its sequence of rows and its sequence of columns.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
S. N. Ethier, Counting toroidal binary arrays, J. Int. Seq. 16 (2013) #13.4.7.
FORMULA
a(n) = (1/n) * Sum_{d|n} Sum_{e|d, f|(n/d)} phi(e) * phi(f) * 2^(n/lcm(d,n/d)). [Ethier]
EXAMPLE
Inequivalent representatives of the a(4) = 19 binary toroidal necklaces:
[0 0 0 0] [0 0 0 1] [0 0 1 1] [0 1 0 1] [0 1 1 1] [1 1 1 1]
.
[0 0] [0 0] [0 0] [0 1] [0 1] [0 1] [1 1]
[0 0] [0 1] [1 1] [0 1] [1 0] [1 1] [1 1]
.
[0] [0] [0] [0] [0] [1]
[0] [0] [0] [1] [1] [1]
[0] [0] [1] [0] [1] [1]
[0] [1] [1] [1] [1] [1]
MATHEMATICA
matcyc[m_]:=Union@@Table[RotateLeft[m, {i, j}], {i, Length[m]}, {j, Length[First[m]]}];
Table[If[n==0, 1, Length[Union[First/@matcyc/@Join@@(Table[Partition[#, d], {d, Divisors[n]}]&/@Tuples[{0, 1}, n])]]], {n, 0, 10}]
PROG
(PARI)
U(n, m, k) = (1/(n*m)) * sumdiv(n, c, sumdiv(m, d, eulerphi(c) * eulerphi(d) * k^(n*m/lcm(c, d))))
a(n) = if(n<1, n==0, sumdiv(n, d, U(n/d, d, 2))) \\ Andrew Howroyd, Jan 24 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Feb 04 2019
STATUS
approved