%I #26 Mar 28 2023 12:39:32
%S 1,2,2,8,18,52,152,492,1618,5408,18452,64132,225432,800048,2865228,
%T 10341208,37568338,137270956,504171584,1860277044,6892335668,
%U 25631327688,95640829924,357975249028,1343650267288,5056424257552,19073789328752,72108867620204
%N Number of n-member subsets of 1..2n whose elements sum to a multiple of n.
%C This is twice A145855 (for n>0), which is the main entry for this problem.
%H Alois P. Heinz, <a href="/A169888/b169888.txt">Table of n, a(n) for n = 0..1669</a>
%F a(n) = A061865(2n,n). - _Alois P. Heinz_, Aug 28 2018
%F a(n) ~ 2^(2*n) / (sqrt(Pi) * n^(3/2)). - _Vaclav Kotesovec_, Mar 28 2023
%p with(combinat): t0:=[]; for n from 1 to 8 do ans:=0; t1:=choose(2*n,n); for i in t1 do s1:=add(i[j],j=1..n); if s1 mod n = 0 then ans:=ans+1; fi; od: t0:=[op(t0),ans]; od:
%t a[n_] := Sum[(-1)^(n+d)*EulerPhi[n/d]*Binomial[2d, d]/n, {d, Divisors[n]}]; Table[a[n], {n, 1, 26}] (* _Jean-François Alcover_, Oct 22 2012, after _T. D. Noe_'s program in A145855 *)
%o (PARI) a(n) = if(n==0, 1, sumdiv(n, d, (-1)^(n+d)*eulerphi(n/d)*binomial(2*d, d)/n)); \\ _Altug Alkan_, Aug 27 2018, after _T. D. Noe_ at A145855
%Y Cf. A061865, A119358, A145855, A318431, A318432, A318433.
%Y Column k=2 of A304482.
%K nonn
%O 0,2
%A _N. J. A. Sloane_, Jul 07 2010, based on a letter from _Jean-Claude Babois_.
%E a(0)=1 prepended by _Alois P. Heinz_, Aug 26 2018