%I #28 Oct 27 2021 11:33:02
%S 6,21,21,76,351,76,336,7826,7826,336,1560,210456,1119936,210456,1560,
%T 7826,6047412,181402676,181402676,6047412,7826,39996,181410426,
%U 31345666736,176319685116,31345666736,181410426,39996,210126,5597460306
%N Table read by antidiagonals: T(n,k) = number of distinct n X k toroidal 0..5 arrays.
%H Andrew Howroyd, <a href="/A184291/b184291.txt">Table of n, a(n) for n = 1..1275</a> (first 31 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.
%F T(n,k) = (1/(n*k)) * Sum_{c|n} Sum_{d|k} phi(c) * phi(d) * 6^(n*k/lcm(c,d)). - _Andrew Howroyd_, Sep 27 2017
%e Table starts
%e 6 21 76 336 1560 7826 39996
%e 21 351 7826 210456 6047412 181410426 5597460306
%e 76 7826 1119936 181402676 31345666736 5642220395616
%e 336 210456 181402676 176319685116
%e 1560 6047412 31345666736
%e 7826 181410426
%e 39996
%t T[n_, k_] := (1/(n*k))*Sum[Sum[EulerPhi[c]*EulerPhi[d]*6^(n*(k/LCM[c, d])), {d, Divisors[k]}], {c, Divisors[n]}]; Table[T[n-k+1, k], {n, 1, 8}, {k, 1, n}] // Flatten (* _Jean-François Alcover_, Oct 30 2017, after _Andrew Howroyd_ *)
%o (PARI)
%o T(n, k) = (1/(n*k)) * sumdiv(n, c, sumdiv(k, d, eulerphi(c) * eulerphi(d) * 6^(n*k/lcm(c,d)))); \\ _Andrew Howroyd_, Sep 27 2017
%Y Columns 1-3 are A054625, A184289, A184290.
%Y Cf. A184271, A184284.
%K nonn,tabl
%O 1,1
%A _R. H. Hardin_, Jan 10 2011