OFFSET
0,2
LINKS
Michael De Vlieger, Table of n, a(n) for n = 0..57
S. N. Ethier and Jiyeon Lee, Counting toroidal binary arrays, II, arXiv:1502.03792v1 [math.CO], Feb 12, 2015 and J. Int. Seq. 18 (2015) # 15.8.3.
Peter Kagey and William Keehn, Counting tilings of the n X m grid, cylinder, and torus, arXiv:2311.13072 [math.CO], 2023. See p. 3.
Wikipedia, Polya enumeration theorem.
FORMULA
a(n) = (2*n^2)^{-1} Sum_{ c divides n } Sum_{ d divides n } phi(c)*phi(d)* 2^(n^2/lcm(c,d)) + (2*n)^{-1} Sum_{ d divides n } phi(d)*2^(n*(n + d - 2 *floor(d/2))/(2*d)), where phi is A000010.
MATHEMATICA
a[n_] := (2 n^2)^(-1) Sum[If[Mod[n, c] == 0, Sum[If[Mod[n, d] == 0, EulerPhi[c] EulerPhi[d] 2^(n^2/ LCM[c, d]), 0], {d, 1, n}], 0], {c, 1, n}] + (2 n)^(-1) Sum[If[Mod[n, d] == 0, EulerPhi[d] 2^(n (n + d - 2 IntegerPart[d/2])/(2 d)), 0], {d, 1, n}];
CROSSREFS
Cf. A184271 (number of m X n binary arrays allowing rotation of rows/columns), A179043 (main diagonal of A184271), A222188 (number of m X n binary arrays allowing rotation/reflection of rows/columns), A209251 (main diagonal of A222188), A255016 (number of n X n binary arrays allowing rotation/reflection of rows/columns as well as matrix transposition).
KEYWORD
nonn
AUTHOR
Stewart N. Ethier, Feb 12 2015
EXTENSIONS
a(0)=1 from Alois P. Heinz, Feb 19 2015
STATUS
approved