%I #20 Mar 28 2023 12:32:10
%S 1,1,2,30,460,10630,324516,12271518,553275192,28987537806,
%T 1731030733840,116068178638786,8634941165110140,705873715441872276,
%U 62895036883536770108,6067037854078500844740,629921975126483973659888,70043473196734767582082246
%N Number of n-member subsets of [n^2] whose elements sum to a multiple of n.
%H Alois P. Heinz, <a href="/A318477/b318477.txt">Table of n, a(n) for n = 0..338</a>
%F a(n) = n * A308667(n) for n >= 1.
%F a(n) ~ exp(n - 1/2) * n^(n - 3/2) / sqrt(2*Pi). - _Vaclav Kotesovec_, Mar 28 2023
%e a(0) = 1: {}.
%e a(1) = 1: {1}.
%e a(2) = 2: {1,3}, {2,4}.
%e a(3) = 30: {1,2,3}, {1,2,6}, {1,2,9}, {1,3,5}, {1,3,8}, {1,4,7}, {1,5,6}, {1,5,9}, {1,6,8}, {1,8,9}, {2,3,4}, {2,3,7}, {2,4,6}, {2,4,9}, {2,5,8}, {2,6,7}, {2,7,9}, {3,4,5}, {3,4,8}, {3,5,7}, {3,6,9}, {3,7,8}, {4,5,6}, {4,5,9}, {4,6,8}, {4,8,9}, {5,6,7}, {5,7,9}, {6,7,8}, {7,8,9}.
%p with(numtheory):
%p a:= proc(n) option remember; `if`(n=0, 1, add(phi(n/d)*
%p (-1)^(n+d)*binomial(n*d, d), d=divisors(n))/n)
%p end:
%p seq(a(n), n=0..20);
%t a[n_] := (-1)^n Sum[(-1)^d Binomial[d n, d] EulerPhi[n/d], {d, Divisors[n]} ]/n; a[0] = 1;
%t a /@ Range[0, 20] (* _Jean-François Alcover_, Sep 23 2019 *)
%Y Main diagonal of A304482 and of A318557.
%Y Cf. A119358, A169888, A308667.
%K nonn
%O 0,3
%A _Alois P. Heinz_, Aug 26 2018