[go: up one dir, main page]

login
A369873
a(n) is the constant term in the expansion of Product_{d|n} (x^d + 1/x^d).
2
0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 2, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 4, 0, 2, 0, 0, 0, 34, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 28, 0, 0, 0, 2, 0, 26, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 4, 0, 2, 0
OFFSET
1,6
COMMENTS
a(n) is the number of solutions to 0 = Sum_{d|n} c_i * d with c_i in {-1,1}, i=1..tau(n), tau = A000005.
LINKS
FORMULA
From Joerg Arndt, Feb 04 2024: (Start)
a(n) != 0 (only) for n in A083207.
a(n) = 2 * A083206(n). (End)
MATHEMATICA
Table[Coefficient[Product[(x^d + 1/x^d), {d, Divisors[n]}], x, 0], {n, 1, 90}]
PROG
(Python)
from collections import Counter
from sympy import divisors
def A369873(n):
c = {0:1}
for d in divisors(n, generator=True):
b = Counter()
for j in c:
a = c[j]
b[j+d] += a
b[j-d] += a
c = b
return c[0] # Chai Wah Wu, Feb 05 2024
(PARI) A369873(n) = { my(s=sigma(n), p=1); if(s%2 || s < 2*n, 0, fordiv(n, d, p *= ('x^d + 'x^-d)); polcoeff(p, 0)); }; \\ (cf. also code in A083206 and A379504) - Antti Karttunen, Jan 20 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 03 2024
EXTENSIONS
Data section extended to a(105) by Antti Karttunen, Jan 20 2025
STATUS
approved