%I #14 Jun 23 2024 16:11:28
%S 0,1,5,40,405,4626,56360,716430,9392085,126044248,1723083930,
%T 23910223514,335912566824,4768447532200,68291880722182,
%U 985538181002940,14317376105810133,209213540276280758,3073003751985537656,45346188478477675122,671920054584212646330,9993514798883508502188
%N a(n) = Sum_{d|2*n} binomial(4*n/d-1, 2*n/d)*phi(d)/(4*n) for n>0 with a(0)=0.
%C a(n) is the number of subsets of {1, 2, ..., 4*n-1} of size 2*n that sum to 3*n mod 4*n [Donderwinkel/Kolesnik].
%H Serte Donderwinkel and Brett Kolesnik, <a href="https://arxiv.org/abs/2403.12941">Asymptotics for Sinaĭ excursions</a>, arXiv:2403.12941 [math.PR], 2024. See Table 1 p. 4.
%t Join[{0}, Table[Sum[Binomial[4*n/d - 1, 2*n/d] * EulerPhi[d] / (4*n), {d, Divisors[2*n]}], {n, 1, 20}]] (* _Vaclav Kotesovec_, Mar 20 2024 *)
%o (PARI) a(n) = if (n==0, 0, sumdiv(2*n, d, binomial(4*n/d-1, 2*n/d)*eulerphi(d))/(4*n));
%o (Python)
%o from math import comb
%o from sympy import totient, divisors
%o def A371372(n): return sum(comb((d<<1)-1,d)*totient((n<<1)//d) for d in divisors(n<<1,generator=True))//n>>2 if n else 0 # _Chai Wah Wu_, Mar 20 2024
%Y Cf. A333682.
%K nonn
%O 0,3
%A _Michel Marcus_, Mar 20 2024