%I #30 Nov 30 2023 12:13:04
%S 3,6,6,11,27,11,24,130,130,24,51,855,2211,855,51,130,5934,44368,44368,
%T 5934,130,315,44487,956635,2691711,956635,44487,315,834,341802,
%U 21524790,174342216,174342216,21524790,341802,834,2195,2691675,498112275
%N Table read by antidiagonals: T(n,k) = number of distinct n X k toroidal 0..2 arrays.
%H Alois P. Heinz, <a href="/A184284/b184284.txt">antidiagonals n = 1..50, flattened</a> (first 58 terms from R. H. Hardin)
%H S. N. Ethier, <a href="http://arxiv.org/abs/1301.2352">Counting toroidal binary arrays</a>, arXiv:1301.2352v1 [math.CO], Jan 10, 2013.
%H S. N. Ethier and Jiyeon Lee, <a href="http://arxiv.org/abs/1502.03792">Counting toroidal binary arrays, II</a>, arXiv:1502.03792v1 [math.CO], Feb 12, 2015.
%H Veronika Irvine, <a href="http://hdl.handle.net/1828/7495">Lace Tessellations: A mathematical model for bobbin lace and an exhaustive combinatorial search for patterns</a>, PhD Dissertation, University of Victoria, 2016.
%H Peter Kagey and William Keehn, <a href="https://arxiv.org/abs/2311.13072">Counting tilings of the n X m grid, cylinder, and torus</a>, arXiv:2311.13072 [math.CO], 2023. See p. 3.
%F T(n,k) = (1/(n*k)) * Sum_{c|n} Sum_{d|k} phi(c) * phi(d) * 3^(n*k/lcm(c,d)). - _Andrew Howroyd_, Sep 27 2017
%e Table starts
%e 3 6 11 24 51 130
%e 6 27 130 855 5934 44487
%e 11 130 2211 44368 956635 21524790
%e 24 855 44368 2691711 174342216 11767964475
%e 51 5934 956635 174342216 33891544611 6863038218842
%e 130 44487 21524790 11767964475 6863038218842
%e 315 341802 498112275 817028472960
%e 834 2691675 11767920118
%e 2195 21524542
%e 5934
%t T[n_, k_] := (1/(n*k))*Sum[EulerPhi[c]*EulerPhi[d]*3^(n*k/LCM[c, d]), {c, Divisors[n]}, {d, Divisors[k]}]; Table[T[n-k+1, k], {n, 1, 9}, {k, 1, n}] // Flatten (*_Jean-François Alcover_, Oct 07 2017, after _Andrew Howroyd_ *)
%o (PARI)
%o T(n, k) = (1/(n*k)) * sumdiv(n, c, sumdiv(k, d, eulerphi(c) * eulerphi(d) * 3^(n*k/lcm(c,d)))); \\ _Andrew Howroyd_, Sep 27 2017
%Y Columns 1-6 are A001867, A184279, A184280, A184281, A184282, A184283.
%Y Main diagonal is A184278.
%Y Cf. A184271, A184277, A184288, A184291, A184331, A184294 (0..1, 0..3 etc.).
%K nonn,tabl
%O 1,1
%A _R. H. Hardin_, Jan 10 2011