|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|