OFFSET
1,6
COMMENTS
a(n) is the number of solutions to n = Sum_{d|n} c_i * d with c_i in {-1,0,1}, i=1..tau(n), tau = A000005.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
MATHEMATICA
Table[Coefficient[Product[(x^d + 1 + 1/x^d), {d, Divisors[n]}], x, n], {n, 1, 80}]
PROG
(Python)
from collections import Counter
from sympy import divisors
def A369875(n):
c = {0:1}
for d in divisors(n, generator=True):
b = Counter(c)
for j in c:
a = c[j]
b[j+d] += a
b[j-d] += a
c = b
return c[n] # Chai Wah Wu, Feb 05 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 03 2024
STATUS
approved