login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A369875
a(n) = [x^n] Product_{d|n} (x^d + 1 + 1/x^d).
1
1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 19, 1, 1, 1, 1, 1, 11, 1, 11, 1, 1, 1, 85, 1, 1, 1, 6, 1, 64, 1, 1, 1, 1, 1, 145, 1, 1, 1, 54, 1, 41, 1, 1, 5, 1, 1, 382, 1, 1, 1, 1, 1, 34, 1, 34, 1, 1, 1, 2425, 1, 1, 3, 1, 1, 27, 1, 1, 1, 23, 1, 1943, 1, 1, 1, 1, 1, 20, 1, 225
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
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