OFFSET
0,3
COMMENTS
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].
LINKS
Serte Donderwinkel and Brett Kolesnik, Asymptotics for Sinaĭ excursions, arXiv:2403.12941 [math.PR], 2024. See Table 1 p. 4.
MATHEMATICA
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 *)
PROG
(PARI) a(n) = if (n==0, 0, sumdiv(2*n, d, binomial(4*n/d-1, 2*n/d)*eulerphi(d))/(4*n));
(Python)
from math import comb
from sympy import totient, divisors
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Mar 20 2024
STATUS
approved