# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a369874 Showing 1-1 of 1 %I A369874 #12 Feb 05 2024 21:00:44 %S A369874 1,1,1,1,1,5,1,1,1,1,1,23,1,1,1,1,1,13,1,13,1,1,1,103,1,1,1,7,1,77,1, %T A369874 1,1,1,1,175,1,1,1,63,1,49,1,1,5,1,1,463,1,1,1,1,1,41,1,39,1,1,1,2975, %U A369874 1,1,3,1,1,33,1,1,1,25,1,2363,1,1,1,1,1,25,1,261 %N A369874 a(n) is the constant term in the expansion of Product_{d|n} (x^d + 1 + 1/x^d). %C A369874 a(n) is the number of solutions to 0 = Sum_{d|n} c_i * d with c_i in {-1,0,1}, i=1..tau(n), tau = A000005. %H A369874 Alois P. Heinz, Table of n, a(n) for n = 1..20000 %t A369874 Table[Coefficient[Product[(x^d + 1 + 1/x^d), {d, Divisors[n]}], x, 0], {n, 1, 80}] %o A369874 (Python) %o A369874 from collections import Counter %o A369874 from sympy import divisors %o A369874 def A369874(n): %o A369874 c = {0:1} %o A369874 for d in divisors(n,generator=True): %o A369874 b = Counter(c) %o A369874 for j in c: %o A369874 a = c[j] %o A369874 b[j+d] += a %o A369874 b[j-d] += a %o A369874 c = b %o A369874 return c[0] # _Chai Wah Wu_, Feb 05 2024 %Y A369874 Cf. A000005, A007576, A033630, A083206, A369873. %K A369874 nonn %O A369874 1,6 %A A369874 _Ilya Gutkovskiy_, Feb 03 2024 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE